[R] stdev, skew, kurtosis, ACF from summary function?
Gabor Grothendieck
ggrothendieck at myway.com
Thu Mar 3 22:44:05 CET 2005
Vivek Rao <vivekrao4 <at> yahoo.com> writes:
:
: The summary() function shows the min, median, mean,
: max, and 25th and 75th percentiles, but not the
: standard deviation, skew, and kurtosis (at least by
: default). Is there are an option of summary() that
: does this, or has someone written code for this?
:
: Since the columns of my table are time series, I would
: also like to display the autocrrelations of each
: series up to a certain lag, as part of the summary.
: Thanks.
:
library(e1071) # to get the skewness and kurtosis functions
apply(x, 2, function(x)
c(sd = sd(x), skew = skewness(x), kurtosis = kurtosis(x), acf = acf(x)$acf))
More information about the R-help
mailing list