[R] Quick data-manipulation question

Sean Davis sdavis2 at mail.nih.gov
Thu Oct 28 15:29:46 CEST 2004


I have a list of data frames and I want to concatenate them into a 
single data frame, basically appending all of the data frames to each 
other (they are all the same shape, in terms of columns).  I'm looking 
for a nice way to do that.  I can of course just consecutively rbind 
them to a "master" dataframe, but I have 22,000 such data frames, each 
with a few hundred rows, so this process takes a good while.  Should be 
simple, I imagine....

Here is a toy data structure.
j <- list()
for (i in letters[1:26]) {j[[i]] <- 
data.frame(rep(i,25),matrix(rnorm(250),nrow=25))}

Thanks.

Sean




More information about the R-help mailing list