[Rcpp-devel] expose functions dynamically

JJ Allaire jj.allaire at gmail.com
Mon Dec 4 19:10:22 CET 2017


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 <tkeitt at utexas.edu> wrote:

>
>
> http://www.keittlab.org/
>
> On Mon, Dec 4, 2017 at 10:47 AM, David Bellot <david.bellot at gmail.com>
> 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
>> Rcpp-devel at lists.r-forge.r-project.org
>> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>>
>
>
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20171204/aaa86f7a/attachment-0001.html>


More information about the Rcpp-devel mailing list