[R] rbinding dataframes

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Sep 25 11:45:27 CEST 2001

On Tue, 25 Sep 2001, L C G Rogers wrote:

> I've got a data frame which I've split by a factor,
> creating a list of dataframes which I have then done
> various operations on individually. I next want to
> recombine the resulting dataframes (still held in a list,
> still with the same number of columns with the same names)
> and there does not appear to be a `good' way to do this -
> at the moment, I'm using a for-loop with the rbind
> command, but this is terribly slow ...  Anyone know a
> better way to do it?

do.call("rbind", list.of.data.frames)

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list