The source files in the package directory given by pkgdir
are scanned for attributes and code is generated as required based on the attributes.
For C++ functions adorned with the Rcpp::export
attribute, the C++ and R source code required to bind to the function from R is generated and added (respectively) to src/RcppExports.cpp
or R/RcppExports.R
. Both of these files are automatically generated from scratch each time compiledAttributes
is run.
In order to access the declarations for custom Rcpp::as
and Rcpp::wrap
handlers the compileAttributes
function will also call any inline plugins available for packages listed in the LinkingTo
field of the DESCRIPTION
file.