Re: [R] Looking for a comprehensive descriptive statistics package

From: Roland Rau <>
Date: Tue, 08 May 2007 14:31:22 -0400


summary(yourdata) is often a very good starting point for descriptive data statistics. Or you can write your own little function which returns what you actually like to see (the code below was written very quickly. No care is taken for the presence of missing values or anything else).

exampledata <- rnorm(10000)
desc <- function(mydata) {

   quantls <- quantile(x=mydata, probs=seq(from=0, to=1, by=0.25))    themean <- mean(mydata)
   thesd <- sd(mydata)
   kurt <- kurtosis(mydata)
   skew <- skewness(mydata)
   retlist <- list(Quantiles=quantls, Mean=themean, StandDev=thesd,

                   Skewness=skew, Kurtosis=kurt)

descstats <- desc(exampledata)

I hope this helps,

David Kaplan wrote:
> Hi all,
> I'm looking for a package that will give me comprehensive set of
> descriptive statistics, including skew and kurtosis. Also, is there a
> similar package that will provide multivariate descriptive statistics as
> well? Thanks in advance,
> David
> mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue 08 May 2007 - 18:35:57 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 08 May 2007 - 20:33:26 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.