RcppParallel.package.skeleton automates the creation of
a new source package that intends to use features of RcppParallel.
It is based on the package.skeleton function which it executes first.
1 2 3 4 5
The name of your R package.
Optional arguments passed to Rcpp.package.skeleton.
In addition to Rcpp.package.skeleton :
The DESCRIPTION file gains an Imports line requesting that the package depends on RcppParallel and a LinkingTo line so that the package finds RcppParallel header files.
The NAMESPACE gains a
useDynLib directive as well
importFrom(RcppParallel, evalCpp to ensure instantiation of RcppParallel.
The src directory is created if it does not exists and a Makevars file is added setting the environment variables PKG_LIBS to accomodate the necessary flags to link with the RcppParallel library.
example_code argument is set to
example files vector-sum.cpp is created in the src directory.
Rcpp::compileAttributes() is then called to generate
R/RcppExports.R. These files are given as an example and should
eventually by removed from the generated package.
Nothing, used for its side effects
Read the Writing R Extensions manual for more details.
Once you have created a source package you need to install it:
see the R Installation and Administration manual,
1 2 3 4 5
## Not run: # simple package RcppParallel.package.skeleton( "foobar" ) ## End(Not run)
Creating directories ... Creating DESCRIPTION ... Creating NAMESPACE ... Creating Read-and-delete-me ... Saving functions and data ... Making help files ... Done. Further steps are described in './foobar/Read-and-delete-me'. Adding Rcpp settings >> added Imports: Rcpp >> added LinkingTo: Rcpp >> added useDynLib directive to NAMESPACE >> added importFrom(Rcpp, evalCpp) directive to NAMESPACE >> created init.c for package registration Adding RcppParallel settings >> added Imports: Rcpp (>= 1.0.1), RcppParallel (>= 4.4.2) >> added LinkingTo: Rcpp, RcppParallel >> added SystemRequirements: GNU make >> added importFrom(RcppParallel,RcppParallelLibs) directive to NAMESPACE >> added src/Makevars >> added src/Makevars.win >> added example file src/vector-sum.cpp >> added example documentation man/vector-sum.Rd >> compiled Rcpp attributes  TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.