Hi Lara, You might try the following (untested):
yourlistofdataframes[sapply(yourlistofdataframes, function(d) nrow(d) > 1)] HTH, Jorge On Tue, May 17, 2011 at 4:24 PM, Lara Poplarski <> wrote: > Hello All, > > I have a list of dataframes, and I need to subset it by keeping only those > dataframes in the list that meet a certain criterion. Specifically, I need > to generate a second list which only includes those dataframes whose number > of rows is > 1. > > Could someone suggest how to do this? I have come close to what I need with > loops and such, but there must be a less clumsy way... > > Many thanks, > Lara > > [[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. > [[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.