I don't want to sound disrespectful, but why not use RcppArmadillo if simplicity is you goal?
It is hard to beat the _fully automatic_ conversion: R> cppFunction("arma::mat doubleUp(const arma::mat & x) { return 2*x; }", depends="RcppArmadillo") R> doubleUp(matrix(1:9,3,3)) [,1] [,2] [,3] [1,] 2 8 14 [2,] 4 10 16 [3,] 6 12 18 R> You can of course do all that by hand too, but why do you think both Rcpp and RcppArmadillo have, respectively, tens of thousands of lines of code? Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel