On Tue, Oct 4, 2011 at 7:42 AM, Jeanne M. Spicer <xn8spi...@gmail.com>wrote:

> I'm not sure how returning an incorrect result is ever a 'positive' feature
>
>

It is **not** "incorrect"; perhaps unexpected, but that is not the same.


> but at least the documentation could more clearly warn users that this
> method behaves differently in these cases -- summary(rock[,1]) vs
> summary(rock[,1:2]) -- and that the method can and *does* return incorrect
> results without any warning messages.
>

What is (in)adequate in documentation is often in the mind of the beholder.

Note:
> class(rock[,1])
[1] "integer"

> class(rock[,1:2])
[1] "data.frame"

This means that different methods are dispatched, leading to the different
results. Morever,
> summary(rock[,1,drop=FALSE])
      area
 Min.   : 1016
 1st Qu.: 5305
 Median : 7487
 Mean   : 7188
 3rd Qu.: 8870
 Max.   :12212

... and that is because
> class(rock[,1,drop=FALSE])
[1] "data.frame"

So the relevant Help file is ?"[.data.frame"


>

>
> I would encourage anyone teaching introductory R to look at the 'epicalc'
> package.  The re-vamped function 'summ' in that package returns correct
> results regardless - summ(rock), summ(rock$area).  In addition, when you
> only ask for one column you not only get the correct results, you also get a
> bonus distribution plot.
>
> I'd would like all of our students to use R, but little things like this
> are huge stumbling blocks for them.
>

I have no doubt that this is true. R is powerful, flexible and, as an
inevitable result, complex. To master it, honest effort is required,
probably a somewhat scarce commodity in introductory classes, especially for
non-statisticians. For that reason, there are numerous learning resources
available, to be found on CRAN. Have you looked at them? Moreover,there are
several R GUI's that attempt to shield the beginner from the initial shock,
to be found in the R-GUIs link under "Other Projects." Have you considered
those?

So I think something more than righteous indignation is called for here.
Nevertheless, the bottom line is that you get what you pay for: R **IS**
hard -- but for many serious data analysts of all stripes, worth the effort.

Cheers,
Bert



> -jeanne
>
>
>


-- 
"Men by nature long to get on to the ultimate truths, and will often be
impatient with elementary studies or fight shy of them. If it were possible
to reach the ultimate truths without the elementary studies usually prefixed
to them, these would not be preparatory studies but superfluous diversions."

-- Maimonides (1135-1204)

Bert Gunter
Genentech Nonclinical Biostatistics

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to