Skip to content
Prev 6994 / 10988 Next

[Rcpp-devel] vector < RawVector > to RawMatrix [like do.call(rbind, mylist)]

Hi, 

If you wrap your std::vector<RawVector> you get a list of raw vectors, and this does not do deep copies of the RawVector. 

If you want a RawMatrix, you have to make copies as all the matrix data is contiguous in memory. 

Perhaps you can change things around, first create the matrix and then fill it instead of creating a vector of RawVector. 

Romain

Le 10 janv. 2014 ? 10:51, "Sven E. Templer" <sven.templer at gmail.com> a ?crit :
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20140110/f53a4d86/attachment-0001.html>