[Rcpp-devel] Performance question about DataFrame

John Merrill john.merrill at gmail.com
Tue Jan 15 16:20:42 CET 2013


It appears that DataFrame::create is a thin layer on top of the R
data.frame call.  The guarantee correctness, but also means the performance
of an Rcpp routine which returns a large data frame is limited by the
performance of data.frame -- which is utterly horrible.

In the current version of R, there's a trivial, but borderline evil, work
around: build a list of lists meeting the basic requirements of a data
frame (they all need to be of the same length, and each component list
needs to be named) and set the type of the object to "data.frame".

I have two questions:
(1) Is it reasonable to anticipate that this hack will continue to work for
the near future in R?
(2) If so, would a patch to that effect be of interest to the developers?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130115/68592a98/attachment.html>


More information about the Rcpp-devel mailing list