perhaps you don't need this anymore but now after extract the dimension m, n,
we can simply generate arma matrix as
mat an_arma_mat(REAL(RA), m, n);
similarly you can convert RB to an arma matrix pointer, operate on it then
return directly RB to R.


I am testing a simple C++ function that takes a double matrix as
argument and which uses routines provided by the C++ Armadillo
package. I am aware of the nice capabilities of Rcpp and RcppArmadillo
which helps simplifying a lot and that I have already successfully
tested. However, I had a hard time trying to figure out how the
coercion from a REALSPX matrix to an arma::mat = arma::Mat<double>
matrix (double matrix in Armadillo) is done. In this particular case,
because of the simplicity of my function, I would like to use base R
only.



--
Sent from: http://r.789695.n4.nabble.com/R-devel-f909078.html

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to