I have been using the begin method to obtain a pointer to the contents
of an Rcpp::Vector object.  For example

Rcpp::NumericVector foo(10);
double *ptr = foo.begin();

Would a preferred idiom be

double *ptr = &foo[0]:

In C I would use the REAL function to obtain a pointer to the contents
of the R object.
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to