<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 28, 2016 at 9:40 PM, Christian Gunning <span dir="ltr"><<a target="_blank" href="mailto:xian@unm.edu">xian@unm.edu</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div><br>B) Are there any *gotchas*  with using Rcpp "modify-in-place" functions inside RefClass methods?<br></div><div></div></blockquote></div><br></div><div class="gmail_extra">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.<br><br></div><div class="gmail_extra">* From help("refClass-class"): <br></div><div class="gmail_extra">"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."<br><br></div><div class="gmail_extra">* From vignette('Rcpp-attributes'):<br>"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."<br><br></div><div class="gmail_extra">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.<br></div><div class="gmail_extra"><br>best,<br>-Christian<br clear="all"><br>-- <br><div class="gmail_signature">A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal – Panama!</div>
</div></div>