How are you deciding which values in the first column go into which subset?
If you have a vector containing those values, you could use %in% or if they're determined logically you could use that criterion. A reproducible example and a bit more information would get you more concrete answers. Sarah On Wed, Jun 13, 2012 at 11:06 AM, Joshua Budman <josh.bud...@gmail.com> wrote: > Hi > I have a large data frame of the form: > a 1 > b 2 > c 3 > And I would like to split this data frame into two separate data > frames based on the values in the first column, e.g. > a 1 > b 2 > and > c 3 > > Is there any way of doing this without having to write a different > "which" statement for each value in column 1 and then doing an "rbind" > at the end? I tried using an if/else statement using a lot of > "||" but that did not work well either. Help would be much appreciated. > > Thanks, > Josh -- Sarah Goslee http://www.functionaldiversity.org ______________________________________________ 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.