Registered Member
|
This might be a bit off-topic... I have C++ code that uses Eigen dynamic matrices. Would someone have a small and simple example of using R functions on MatrixXd data? I found Rinside package (http://dirk.eddelbuettel.com/code/rinside.html), but it would be great to be able to use it without having to make a copy of Eigen matrices into NumericMatrix in R.
Thanks. |
Moderator
|
You can use .data() to get a pointer to the first element of the matrix, and .outerStride() to get the leading dimension. Then how to make use of them with R is out of my knowledge. You should ask on a R forum.
|
Registered Member
|
have you looked at the sources of the Rclusterpp package? I'm not sure but it seems to me it is calling some R functions
http://cran.r-project.org/web/packages/ ... index.html For the moment, there are only two R packages using eigen (the other one is sparseLTSEigen). |
Registered Member
|
Thanks.
I was also pointed to RcppEigen package on the Rcpp mailing list. |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]