On 2011-07-27, at 10:33 AM, Michael Braun wrote: > I want to avoid making a copy of the entire list (my real-world application > might have lots of different elements for each element of the "master" list). > But what works fine is if, within the loop, I do the Rcpp-to-double > conversion, and then call a version of the function that takes a double as an > argument, instead of the SEXP. So I think there is something going on with > passing the SEXP to func, and then using Rcpp::as to convert the SEXP to > double. > > Is this close to what you are asking?
Yep. I'm still surprised that Rcpp:as works (I thought it would also take a SEXP as an argument), but if it works, then great. Davor _______________________________________________ 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