An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-help/attachments/20021218/68f2eceb/attachment.pl
summary stats including NA's into new dataframe
2 messages · Alexander.Herr@csiro.au, Uwe Ligges
Alexander.Herr at csiro.au wrote:
List, I am trying to extract summary statistics from a data frame with several variables (and NAs) into a dataframe with the columns: Variablename (ie the colnames of original data), mean, stdev, max, min, Valid N, Missing Values. Extracting the statistics is straightforward using stack and aggregate. However, I haven't succeeded in obtaining the number of Missing Values. I can extract these from describe (Hmisc library), but surely there is a simpler way similar to obtaining the mean using aggregate?
The similar way is: aggregate(......., function(x) sum(is.na(x))) Uwe Ligges
Suggestions are much appreciated