[R] Quick data-manipulation question

hadley wickham h.wickham at gmail.com
Thu Oct 28 17:28:58 CEST 2004


How about do.call("rbind", j) ?

Hadley

On Thu, 28 Oct 2004 09:29:46 -0400, Sean Davis <sdavis2 at mail.nih.gov> wrote:
> 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
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>




More information about the R-help mailing list