[Rcpp-devel] Translating between Rcpp Vectors and Matrices?
kevinushey at gmail.com
Fri Feb 1 02:41:50 CET 2013
I was wondering - is there a way to translate between Vectors and Matrices?
Eg, reinterpreting a 100 length NumericVector as a 10x10 NumericMatrix by
setting the dimensions explicitly, or something of that form; preferably
with a minimal amount of copying.
Alternatively, is there a preferred method for constructing a
NumericMatrix for output from a std::vector?
The motivation is primarily for reshaping of R objects through Rcpp. I
wasn't able to find anything specific in the vignettes.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rcpp-devel