[Rcpp-devel] Additional constructors for DataFrame

Davor Cubranic cubranic at stat.ubc.ca
Mon Nov 26 06:19:18 CET 2012

Although DataFrame is a subclass of List, it's missing a few handy 
constructors that List (i.e., Vector) have, such as "(const int& size)" 
to pre-allocate the space for it.

Yes, I can always create a List first and convert it to a DataFrame 
afterwards, but this actually doesn't copy some attributes from the 
original List. (I noticed it for "row.names", but there may be others.)

I'd be happy to submit a small patch, but wanted to check here first if 
I'm missing any potential problems around these constructors and that's 
the reason why they are not available for DataFrames.



More information about the Rcpp-devel mailing list