Dear All,
I thought something like this would fail (would not compile):
// [[Rcpp::export]]
double changeAVector(const NumericVector a) {
a[0] = 3.0;
return 44.0;
}
But it does compile OK, and it really does modify the argument:
d1 <- c(93, 99); changeAVector(d1); d1
Is this expected?
Thanks,
R.
--
Ramon Diaz-Uriarte
Department of Biochemistry, Lab B-25
Facultad de Medicina
Universidad Autónoma de Madrid
Arzobispo Morcillo, 4
28029 Madrid
Spain
Phone: +34-91-497-2412
Email: [email protected]
[email protected]
http://ligarto.org/rdiaz
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel