[Rcpp-devel] plugin in a package - how is it registered?

Simon Zehnder szehnder at uni-bonn.de
Sat Oct 12 09:52:24 CEST 2013


Hi Dirk,

my actual intent is to support inline by another plugin, that is provided by a package. 

But you point to the answer I was hoping for below. It seems that there is no need to invoke registerPlugin inside of package code for using a plugin later somewhere with inline.

Thanks

Simon


On Oct 11, 2013, at 11:54 PM, Dirk Eddelbuettel <edd at debian.org> wrote:

> 
> Simon,
> 
> On 11 October 2013 at 23:43, Simon Zehnder wrote:
> | I have a very short question in regard to plugins in packages. I have written my own plugin using Rcpp.plugin.maker (very well documented in FAQ btw).
> | 
> | I know, that on the command line calling registerPlugin() registers the plugin. From RcppArmadillo I can see, that the registerPlugin function is never called inside the package - but I see also, that the file is called inline.R. How does the inline package register/identify a plugin? Is a plugin registered automatically when called inside cxxfunction? Does it have to be put into a file called 'inline.R'? 
> 
> What is your actual intent?  To support inline? To support Rcpp Attributes?
> 
> I have not looked at this in a while, but I think we may not actually
> required registration (ie there is no run-time state vector accumulating
> plugin callbacks...) but when a plugin is invoked, it points to a package and
> hence the package namespace is searched and a corresponding function is
> called.
> 
> This is from memory. Actual details may differ. Void where prohibited :)
> 
> Dirk
> 
> -- 
> Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com



More information about the Rcpp-devel mailing list