On Mon, Nov 28, 2016 at 9:40 PM, Christian Gunning <x...@unm.edu> wrote:
> > B) Are there any *gotchas* with using Rcpp "modify-in-place" functions > inside RefClass methods? > After some reading, I'm going to answer my own question and point to one possible *gotcha* that wasn't clear to me at first. * From help("refClass-class"): "In particular, methods should not use non-exported entries in the package's namespace, because the methods may be inherited by a reference class in another package." * From vignette('Rcpp-attributes'): "The compileAttributes function deals only with exporting C++ functions to R . If you want the functions to additionally be publicly available from your package’s namespace another step may be required." So, the Rcpp helper functions used by refClass methods should be exported from the package namespace to facilitate downstream inheritance, even if the helper functions are not intended for public consumption. Honestly, this is unlikely to be an issue for average users. best, -Christian -- A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal – Panama!
_______________________________________________ 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