Re: [R] Rcpp, function signature

2015-08-28 Thread peter dalgaard
On 27 Aug 2015, at 17:40 , Dirk Eddelbuettel e...@debian.org wrote: Michael Meyer via R-help r-help at r-project.org writes: I am an (very) grateful user of Rcpp. Glad to hear that! But you are on the wrong mailing list. Please ask on rcpp-devel. But for the benefit of the rest of

Re: [R] Rcpp, function signature

2015-08-28 Thread Dirk Eddelbuettel
peter dalgaard pdalgd at gmail.com writes: But for the benefit of the rest of us: A NumericVector is a pointer, right? Effectively even though it is not treated as one by the users. But you know what P in SEXP stands for, and Rcpp objects really are what we call proxy objects for the

[R] Rcpp, function signature

2015-08-27 Thread Michael Meyer via R-help
Greetings, I am an (very) grateful user of Rcpp. As such I defined a function // [[Rcpp::export]] NumericVector leftShift(NumericVector x){ for(int i=0;in-1;i++) x[i]=x[i+1]; return x; } expecting this function not to affect the parameter x outside the function body as it is passed in by

Re: [R] Rcpp, function signature

2015-08-27 Thread Dirk Eddelbuettel
Michael Meyer via R-help r-help at r-project.org writes: I am an (very) grateful user of Rcpp. Glad to hear that! But you are on the wrong mailing list. Please ask on rcpp-devel. Dirk __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and