Re: [R] Split data frame based on Class

2009-05-18 Thread Kushantha Perera
2 9 c95 13c23 14c54 Cheers! Kushantha -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Chris Arthur Sent: Monday, May 18, 2009 4:54 PM To: r-help@r-project.org Subject: [R] Split data frame based on

Re: [R] Split data frame based on Class

2009-05-18 Thread jim holtman
?split new.df <- split(old.df, old.df$Class) will create a list of dataframes split by Class On Mon, May 18, 2009 at 7:23 AM, Chris Arthur wrote: > Each row of my data frame is assigned to a class (eg country). Can you > suggest how I break apart the data frame so that I create new data frames

[R] Split data frame based on Class

2009-05-18 Thread Chris Arthur
Each row of my data frame is assigned to a class (eg country). Can you suggest how I break apart the data frame so that I create new data frames for each class eg If Class = "US" put in new dataframe dataUS Thanks in advance for your help Chris __