[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:46:53 CEST 2014


Venelin,

For completeness, things also work for me on conversion vectors 'in':

R> cppFunction("SEXP uvec2(arma::uvec v) { arma::uvec w = 2*v; return(wrap(w)); }", depends="RcppArmadillo")
R> uvec2(seq(1L, 3L))
     [,1]
[1,]    2
[2,]    4
[3,]    6
R> cppFunction("SEXP ivec2(arma::ivec v) { arma::ivec w = 2*v; return(wrap(w)); }", depends="RcppArmadillo")
R> ivec2(seq(1L, 3L))
     [,1]
[1,]    2
[2,]    4
[3,]    6
R> 

A reproducible example would be good.

Dirk

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


More information about the Rcpp-devel mailing list