[Rcpp-devel] When does using iterators for subscripting help?

Hadley Wickham hadley at rice.edu
Fri Jan 6 20:53:45 CET 2012


> As I said earlier, this construction guarantees that the storage is
> not copied.  An Rcpp::NumericVector also uses the storage from R but
> it can be difficult to determine exactly when a copy constructor,
> which actually allocates new storage for an SEXPREC, is invoked.

But that's half the fun of programming in R! ;)

Thanks for the other explanations.

Hadley


-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/


More information about the Rcpp-devel mailing list