Learn R Programming

inline (version 0.3.6)

plugins: Plugin system for cxxfunction

Description

cxxfunction uses a plugin system to assembly the code that it compiles. These functions allow to register and get plugins by their name.

Usage

getPlugin(name, ...)
registerPlugin(name, plugin)

Arguments

name
name of the plugin.
...
Further argments to pass to the plugin.
plugin
plugin function.

Value

  • getPlugin retrieves the plugin and invokes it with the ...arguments registerPlugin does not return anything.

Details

plugins are functions that return a list with : [object Object],[object Object],[object Object],[object Object]

plugins can be manually registered using the registerPlugin function. Alternatively, a package may supply an inline plugin implicitely by defining a function called inlineCxxPlugin, which does not necessarily need to be exported from the namespace of the package.

Known packages implementing this scheme include Rcpp and RcppArmadillo.

See Also

cxxfunction

Examples

Run this code
getPlugin( "Rcpp" )

Run the code above in your browser using DataLab