Hi everybody<div><br></div><div>this is probably a trivial question,but still something is not clear to me.</div><div><br></div><div>Moving from SEXP => Rcpp => arma objects (say a matrix) I could do:</div><div><br></div>
<div>Rcpp::NumericMatrix A(clone(X)); // I want deep copy</div><div>arma::mat B = as< mat >(A); // again a copy</div><div><br></div><div>...</div><div>some code here that modifies B</div><div>...</div><div><br></div>
<div>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.</div><div><br></div><div>wrap() is no good, so what else?</div><div><br></div><div>Stefano</div>