On Sun, 17 Oct 2004, Mihai Nica wrote: > Greetings: > > I would like to make a table with descriptive statistics for a data.frame. I guess > the question is how can I put together, in a table, the results from, say: > > apply(df, 2, mean, na.rm =T) > apply(df, 2, median, na.rm =T) > .......
Please check ?apply: it applies to matrices, not data frames. Try sapply(mydf, summary) and extract the info you want, or write your own summary function such as sapply(mydf, function(x) c(mean=mean(x), median=median(x))) -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html