Re: [R] Stratified data summaries

2009-07-12 Thread David Freedman
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 wan

Re: [R] Stratified data summaries

2009-07-12 Thread David Winsemius
On Jul 9, 2009, at 6:52 PM, Hayes, Rachel M wrote: 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) by(myDataFrame, patient_ty

Re: [R] Stratified data summaries

2009-07-09 Thread Dylan Beaudette
Hi, the plyr package is your friend. Here is a tutorial on a related subject: http://casoilresource.lawr.ucdavis.edu/drupal/node/836 cheers, Dylan On Thursday 09 July 2009, Hayes, Rachel M wrote: > Hi All, > > > > I'm trying to automate a data summary using summary or describe from the > HMisc

[R] Stratified data summaries

2009-07-09 Thread Hayes, Rachel M
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