[Rcpp-devel] arma to Rcpp

Stefano Calza stecalza at gmail.com
Wed Dec 14 13:55:14 CET 2011


Hi everybody

this is probably a trivial question,but still something is not clear to me.

Moving from SEXP => Rcpp => arma objects (say a matrix) I could do:

Rcpp::NumericMatrix A(clone(X)); // I want deep copy
arma::mat B = as< mat >(A); // again a copy

...
some code here that modifies B
...

Now, what shall I do if I want to transform B into a Rcpp::NumericMatrix?
Why? For example I might want to add attributes to it.

wrap() is no good, so what else?

Stefano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20111214/46e8c3c2/attachment.htm>


More information about the Rcpp-devel mailing list