[Rcpp-devel] finding plugins

M A markoilcan at gmail.com
Sat Dec 1 18:30:44 CET 2018


Yes, thanks, I did at least manage to read through the FAQ, but,
unfortunately, none of the mentions of 'plugins' was helpful for my
questions. I can search through the source to find the plugins that come
with Rcpp, but I'm not familiar enough with the necessary mechanisms to
know what hooks to look for or use to be able to list currently registered
plugins.

An issue is that I can't get at least some plugins to work with
cppFunction. For instance:
library(Rcpp)
library(RcppArmadillo)
library(inline)
cppFunction('//Anything', depends="RcppArmadillo", plugin="RcppArmadillo",
verbose=TRUE)

just gives error:
Error in .findPlugin(pluginName) :
  Inline plugin 'RcppArmadillo' could not be found within the Rcpp package.
You should be sure to call registerPlugin before using a plugin.

Thanks,
Mark

On Sat, Dec 1, 2018 at 9:18 AM Dirk Eddelbuettel <edd at debian.org> wrote:

>
> On 30 November 2018 at 21:49, M A wrote:
> | Is there a standard way to list what plugins are available in Rcpp? And,
> | given a plugin, how do I find out what exactly is in that plugin? I did
> | find in the inline package inline::getPlugin() for the second of these
> | questions, but it does not work on Rcpp plugins (e.g. the openmp plugin)
> | and I can't find an equivalent in Rcpp. These seem like they should be
> easy
> | questions with obvious solutions, but I can't find anything. Sorry if I
> did
> | miss something obvious.
>
> Have you found this obvious answer yet:
>
>    Rcpp FAQ Question 3.6
>    "How do I write a plugin for inline and/or Rcpp Attributes"
>
> My pdf reader shows me 36 hits for 'plugin' in that Rcpp FAQ document.
>
> As for 'what exists': there is no central registry as packages can bring
> their own; the mechanism is such that when a package loads it can register
> upon load.  You could use the same hooks to a) scan all your installed (but
> not yet loaded) packages and b) list currently registered plugins. I don't
> think anybody has written such a helper yet.
>
> As for 'what is in it':  "Use the source, Luke."
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20181201/cabab7aa/attachment.html>


More information about the Rcpp-devel mailing list