Hi Whit, On 5 October 2010 at 12:25, Whit Armstrong wrote: | I just reviewed the Rcpp documentation.
Great. Now tell us how to make it sticky so that we get you to contribute :) | I see plenty of cfunction/cxxfunction examples, but I'm curious | whether one can provide a class definition inline in an R script and | then initialize an instance of the class and call a method on the | class. all inline in R. | | Is this feature something you all would consider adding to Rcpp? a) A change would be an inline feature, not an Rcpp feature. b) But we already do :) support this, and even use it in numerous cases in the unit tests; this uses the include= argument to cxxfunction et al. So you can supply your templated logic in an R string to include= and then use the code in an R string to to src= and pass it all through cxxfunction() for a quick test. See e.g. runit.macros.R or or runit.Module.R. I think we also have blog posts and / or vignette examples that use it. Hth, Dirk -- Dirk Eddelbuettel | [email protected] | http://dirk.eddelbuettel.com _______________________________________________ Rcpp-devel mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
