[Rcpp-devel] Broken conversion from R-type integer to uvec after update to newer Rcpp version

Dirk Eddelbuettel edd at debian.org
Sun Apr 20 15:50:29 CEST 2014


Got it:

R> cppFunction("arma::uvec venelin(const arma::uvec v) { return(v); }", depends="RcppArmadillo")
R> venelin(1:3)
           [,1]
[1,]          0
[2,] 1072693248
[3,]          0
R> cppFunction("arma::uvec venelin2(arma::uvec v) { return(v); }", depends="RcppArmadillo")
R> venelin2(1:3)
     [,1]
[1,]    1
[2,]    2
[3,]    3
R> 

The const seems to throw it off.  We will try to take a look!

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com


More information about the Rcpp-devel mailing list