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?
_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to