Message-ID: <01EAFA83F326C74A9FDA63CECD54CAC437BD7957@SN2PRD0710MB394.namprd07.prod.outlook.com>
Date: 2013-03-06T00:50:28Z
From: Silkworth,David J.
Subject: [Rcpp-devel] Working with arma::cube
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.
arma::cube X=Rcpp::as<arma::cube>(arg1);
This line fails to compile.
I can build this cube from an input vector using explicit nested loops. I also notice that wrap() does a fine job of returning the array back to R.
Is there anything else I need to know to more simply bring the array in as an SEXP and land it in the arma::cube.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130306/b0165532/attachment.html>