Re: [R] SAPPLY function XXXX

From: Erik Iverson <>
Date: Wed, 04 May 2011 15:26:59 -0500

> 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(!,
> n.miss=sapply(data1,sum(
> data1.contents

Also meant to mention to see ?describe in the Hmisc package:


 > describe(c(NA, 1:10))

There is also a useful method for data.frame objects.

--Erik mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 05 May 2011 - 06:25:13 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 Thu 05 May 2011 - 07:00:07 GMT.

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

list of date sections of archive