taking rows from data.frames in list to form new data.frame?
On Wed, Apr 20, 2011 at 6:36 PM, Dennis Murphy <djmuser at gmail.com> wrote:
Hi: Perhaps you're looking for subset()? I'm not sure I understand the problem completely, but is do.call(rbind, lapply(database, function(df) subset(df, Symbol == 'IBM'))) or library(plyr) ldply(lapply(database, function(df) subset(df, Symbol == 'IBM'), rbind)
That's a bit redundant. All you need is: ldply(database, function(df) subset(df, Symbol == 'IBM')) Hadley
Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University http://had.co.nz/