Serguei, First, I think we mentioned to you after your first post on rex2arma that all serious Rcpp development is generally done in packages. You should probably embrace that mode too. Many of us prefer it.
Second, 'expm' does not need to be reimplemented. See my RcppKalman package (on GitHub only) to see how to access the expm code (from the package of the same name by Goulet, Dutang,Maechler et all -- all serious people) directly from RcppArmadillo. Third, your code calls back into R via Rcpp::Environment. As a first test I'd try to do without. The recommendation usually is "minimally self-contained reproducible examples" for bug report. I, like many other people, have found that a good number of times the "bug" becomes apparent while preparing such a report. Maybe someone will have time to go through your somewhat-non-standard in detail. Cheers, Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel