[R] rbind and data.frame

Göran Broström gb at stat.umu.se
Fri Dec 7 16:47:24 CET 2001


On 7 xxx -1, Emmanuel Paradis wrote:

[...]
 
> I seem to remember that R is not very efficient at creating/manipulating
> large data frames. Did you consider doing it with a matrix with 58000 rows?
> In that case, of course, all your columns *must* be of the same mode.

Yes, I tried reading from a data.frame, doing some calculations,
and writing to rows of a matrix. It is definitely faster than writing to
a data frame, but _much_ slower than compiled code. We also have to 
convert the matrix to a data frame of a given type. It is not quite 
trivial, because variable types and names have  to be 'read' from the 
input data frame, but I think I know how to do that.

I think the _real_ problem is that I have to do this in a loop, row by 
row, because the input rows produce a variable number of output rows.

Göran

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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