On 6 March 2013 at 03:22, alexios ghalanos wrote:
| Try this:
|
| library(RcppArmadillo)
| library(inline)
| if( require( RcppArmadillo ) ){
| fx <- cxxfunction( signature(x = "vector", n = "integer") , '
| Rcpp::NumericVector XX(x);
| Rcpp::IntegerVector dim(n);
Try this:
library(RcppArmadillo)
library(inline)
if( require( RcppArmadillo ) ){
fx <- cxxfunction( signature(x = "vector", n = "integer") , '
Rcpp::NumericVector XX(x);
Rcpp::IntegerVector dim(n);
arma::cube AY(XX.begin(), dim[0], dim[1], d
On 6 March 2013 at 00:50, Silkworth,David J. wrote:
| I am helping a student build some R code in Rcpp for his first time. He is
| working with 3-dimensional arrays, so I am hopeful to be working with
| arma::cube objects.
|
| When I simply try to bring the array in as an argument I can?t seem
I am helping a student build some R code in Rcpp for his first time. He is
working with 3-dimensional arrays, so I am hopeful to be working with
arma::cube objects.
When I simply try to bring the array in as an argument I can't seem to use the
same as<[TEMPLATE]> construction as other objects.