[Rd] small suggestion---add sd to summary() for vectors, matrices, and data frames

ivo welch ivo.welch at gmail.com
Mon Feb 14 14:54:43 CET 2011


Dear R developers---of course, I have my own function that does this,
but I think this would be useful for others, too.  summary() already
returns the first moment, and I would hope most of us think of the
standard deviation as a pretty common summary statistic.

not to clutter this mailing list, but it would also be useful to have
an optional parameter that creates a different type of output,
stacking the univariate outputs, along the lines of
    for (i in 1:ncol(d))  cat(names(d)[i], summary(d[i]), "\n")
of course, both of these suggestions may be useful but are not necessary.

my biggest suggestion is still to issue an "ambiguity warning" when
"<-[0-9]" is encountered, suggesting to users either to use '<-[
][0-9]' or '<[ ]-[0-9]' spacing for disambiguation.  this would help a
lot of my students who are newcomers.

regards,

/iaw
----
Ivo Welch (ivo.welch at brown.edu, ivo.welch at gmail.com)



More information about the R-devel mailing list