[Rcpp-devel] Rcpp:wrap - any limitations for vector s ize?
Mathias Bader
mail at mathiasbader.de
Fri Aug 10 08:31:38 CEST 2012
Hello
First, thank you very much for you very fast and helpful answers - I
appreciate it a lot!
I found the error, the problem was that the method Rcpp::List::create()
does not always do what it should under Rcpp version 0.9.10. The reason
why this error is kind of hard to spot is that it doesn't occure
consistently but just about every tenth time. An update to Rcpp 0.9.13
fixes that issue.
I tought I would have the newest version of the package since I
performed an "Update pakages" in my R Studio and it told me that all
packages are up to date. Unfortunately I have not been aware of the fact
that not all CRAN mirrors contain the same packages which I naively
assumed. Switching between mirrors randomly I couldn't find one that
provides Rcpp in version 0.9.13. I manually downloaded it from the Rcpp
website and installed it from the download. Now it works.
Just writing it down here since someone might have the same problem and
might stumble upon this post. Sorry for spam.
Hav a nice day and thanks again for your fast relplies.
Sincerely,
Mathias
On Thu, 9 Aug 2012 08:17:01 -0500, Dirk Eddelbuettel wrote:
> 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
More information about the Rcpp-devel
mailing list