You might also want to look at the doBy package - one function is summaryBy:
summaryBY(var1 + var2 ~ patient_type, data=d, FUN=summary) david freedman Hayes, Rachel M wrote: > > Hi All, > > > > I'm trying to automate a data summary using summary or describe from the > HMisc package. I want to stratify my data set by patient_type. I was > hoping to do something like: > > > > Describe(myDataFrame ~ patient_type) > > > > I can create data subsets and run the describe function one at a time, > but there's got to be a better way. Any suggestions? > > > > Rachel > > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. > > -- View this message in context: http://www.nabble.com/Stratified-data-summaries-tp24419184p24449565.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.