Re: [Rcpp-devel] as cube

2011-06-06 Thread MISRA, SANJOG
[email protected]] On Behalf Of Richard Chandler Sent: Monday, June 06, 2011 11:13 AM To: rcpp-devel Subject: [Rcpp-devel] as cube Hi, I would like to do something like this: src.cube <- " arma::cube a = as(aR); return wrap(a); " fx <- cxxfunction(sig

[Rcpp-devel] as cube

2011-06-06 Thread Richard Chandler
Hi, I would like to do something like this: src.cube <- " arma::cube a = as(aR); return wrap(a); " fx <- cxxfunction(signature(aR="array"), src.cube, plugin="RcppArmadillo") fx(array(1:27, c(3,3,3))) But it fails. Can someone suggest a good alternative? I tried to create the cube on