On 24 May 2012 at 12:34, Andrew Redd wrote: | Rcpp List, | | Is there a recommended way to handle default arguments for | constructors? I have a class that I have created and exposed through | Rcpp Modules. I now found that I need to expose a tuning parameter | and need to modify my constructors. The standard way would be to | include just a default argument, but I didn't think that Rcpp could | handle default arguments in constructors. Am I wrong? Any | recommendations?
I think you are correct. So you may have to make do with just setting a default value in the existing constructor's body, and offering an additional setter. Rcpp modules are a sort-of half-way house between the full glory of C++ and the more direct interactive nature of R. Not everything can be mapped that way, and we point to class member functions by name only. Dirk -- Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com _______________________________________________ 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