[Rcpp-devel] A proper R arrays with any dimensions in Rcpp ?

Dirk Eddelbuettel edd at debian.org
Mon Feb 20 18:34:37 CET 2012

On 20 February 2012 at 16:58, mateusz.kaduk at gmail.com wrote:
| Hi,
| I would like to implement algorithm which works on 4 or more dimensional array.
| Is it possible to have full support of R arrays in Rcpp ?

This has come up before on the list but I fear we are currently limited to
three dimension by virtue of the Dimension() class.  

The Dimension class uses a simple simple vector object 'dims' (not unlike R
itself) so maybe it is possible to extend this -- but you will probably have
to extend a number operators too to access the elements.  Not sure if that
can be called straightforward.


"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx

More information about the Rcpp-devel mailing list