Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pluginsAttribute

Rcpp::plugins Attribute


Description

The Rcpp::plugins attribute is added to a C++ source file to specify the inline plugins that should be used in the compilation.

// [[Rcpp::plugins(plugin1, plugin2)]]

Arguments

...

Plugins to add to the compilation.

Details

Plugins must be registered using the registerPlugin function.

When included within a sourceCpp translation unit, the configuration-related fields of the plugin (e.g. env and LinkingTo) are utilized, however the code-generation fields (e.g. includes and body) are not.

Note

Rcpp includes a built-in cpp11 plugin that adds the flags required to enable C++11 features in the compiler.

See Also

Examples

## Not run: 

// [[Rcpp::plugins(cpp11)]]

// [[Rcpp::export]]
int useCpp11() {
    auto x = 10;
    return x;
}

## End(Not run)

Rcpp

Seamless R and C++ Integration

v1.0.6
GPL (>= 2)
Authors
Dirk Eddelbuettel, Romain Francois, JJ Allaire, Kevin Ushey, Qiang Kou, Nathan Russell, Douglas Bates and John Chambers
Initial release
2021-01-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.