[Rcpp-devel] Rcpp:wrap - any limitations for vector s ize?

Dirk Eddelbuettel edd at debian.org
Thu Aug 9 15:17:01 CEST 2012


Hi Mathias,

On 9 August 2012 at 14:08, Mathias Bader wrote:
|  My question: Is there any restriction on the size of the vectors which 
|  I hand from C++ to R? Because during the MCMC simulation the vectors 
|  might become really big.

As Rcpp objects are 'proxy objects' for the underlying R objects, we are
bound by the exact same limits that R objects are bound.  So currently
vectors are limited to 2^31 - 1 elements, and as matrices are internally
stored as vectors with a dimension argument, this holds for matrices too. 

R 2.16.0 may bring a chance, but for now this is the hard limit.

Dirk

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


More information about the Rcpp-devel mailing list