Note that you can also include modules within a C++ file and sourceCpp will automatically add them to the calling environment (as if you had "sourced" the definition of an R reference class).
On Mon, Dec 4, 2017 at 12:36 PM, Tim Keitt <[email protected]> wrote: > > > http://www.keittlab.org/ > > On Mon, Dec 4, 2017 at 10:47 AM, David Bellot <[email protected]> > wrote: > >> | - What is the correct way to do that ? >>> >>> In a package, yes. Modules require a package. Outside of a package, >>> consider >>> using a package instead :) >>> >> >> Huh ? >> OK I'm lost now :-D >> >> So in the end, how would it work ? What am I missing in my code to make >> it work ? >> > > Unless I misunderstood, are you not looking for "Rcpp::sourceCpp"? Don't > use modules. Just use the // [[Rcpp::export]] attribute. > > THK > > >> >> >>> >>> I think a few other people / projects have invented other dynamic >>> schemes but >>> I do not have a list or overview. Would be handy to have -- maybe someone >>> wants to blog about a comparison? >>> >> >> I'm curious too indeed. >> >> _______________________________________________ >> Rcpp-devel mailing list >> [email protected] >> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel >> > > > _______________________________________________ > Rcpp-devel mailing list > [email protected] > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel >
_______________________________________________ Rcpp-devel mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
