[Rcpp-devel] can one modify array in R memory from C++ without copying it?

Davor Cubranic cubranic at stat.ubc.ca
Mon Nov 7 04:31:48 CET 2011


On November 6, 2011 07:32:44 AM Dirk Eddelbuettel wrote:
> This is blown way out of proportion.  As I said, the behaviour is
> documented, and the corner case gets mentioned in all our talks too (see
> the Google Tech Talk video for example).

I agree with Dirk. Modifying Rcpp arguments in-place is not a beginner-level 
trick, so if you're writing code that does that kind of stuff, better check the 
type of the SEXP being passed in first and don't be surprised by implicit type 
conversions. 

As the old saying goes, "If you want to play with the big dogs, ..."

Davor


More information about the Rcpp-devel mailing list