Hi r-help-boun...@r-project.org napsal dne 04.05.2011 22:26:59:
> Erik Iverson <er...@ccbr.umn.edu> > Odeslal: r-help-boun...@r-project.org > > 04.05.2011 22:26 > > Komu > > Dan Abner <dan.abne...@gmail.com> > > > > Ultimately, I would like for this to be 1 conponent in a larger function > > that will produce PROC CONTENTS style output. Something like... > > > > data1.contents<-data.frame(Variable=names(data1), > > Class=sapply(data1,class), > > n.valid=sapply(data1,sum(!is.na)), > > n.miss=sapply(data1,sum(is.na))) > > data1.contents > > Also meant to mention to see ?describe in the Hmisc package: > > E.g., > > > describe(c(NA, 1:10)) > > There is also a useful method for data.frame objects. colSums(is.na(data1)) colSums(!is.na(data1)) may also show number of missing and nonmissing values in data frame. Regards Petr > > --Erik > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.