> Giovanni, > > Anything you pass from R into your C++ routine should be considered > read-only. It's typically a bad idea to do in-place updates of the R > object you passed in as an argument.
Really? I was under the impression that the ability of in-place modification was a conscious design decision. Be aware that you've stepped outside of the functional programming paradigm, yes. But read-only? From the C++ point of view, it's just memory. That said, if you want safety (e.g. default R behaviour), use clone(). Then you can modify to your heart's content. -Christian -- A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal – Panama! _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel