?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 <chris.arthur@bristol.ac.uk>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
> for each class
>
> eg
>
> If Class = "US" put in new dataframe dataUS
>
> Thanks in advance for your help
>
> Chris
>
> ______________________________________________
> 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<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?

	[[alternative HTML version deleted]]


