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

RcppParallel.package.skeleton

Create a skeleton for a new package depending on RcppParallel


Description

RcppParallel.package.skeleton automates the creation of a new source package that intends to use features of RcppParallel.

Usage

RcppParallel.package.skeleton(name = "anRpackage", example_code = TRUE, ...)

Arguments

name

The name of your R package.

example_code

If TRUE, example C++ code using RcppParallel is added to the package.

...

Optional arguments passed to Rcpp.package.skeleton.

Details

It is based on the package.skeleton function which it executes first.

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 as an 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.

If the example_code argument is set to TRUE, example files vector-sum.cpp is created in the src directory. Rcpp::compileAttributes() is then called to generate src/RcppExports.cpp and R/RcppExports.R. These files are given as an example and should eventually by removed from the generated package.

Value

Nothing, used for its side effects

References

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, INSTALL and install.packages.

See Also

Examples

## Not run: 
# simple package
RcppParallel.package.skeleton("foobar")

## End(Not run)

RcppParallel

Parallel Programming Tools for 'Rcpp'

v5.1.4
GPL (>= 2)
Authors
JJ Allaire [aut], Romain Francois [aut, cph], Kevin Ushey [aut, cre], Gregory Vandenbrouck [aut], Marcus Geelnard [aut, cph] (TinyThread library, https://tinythreadpp.bitsnbites.eu/), Hamada S. Badr [ctb] (<https://orcid.org/0000-0002-9808-2344>), RStudio [cph], Intel [aut, cph] (Intel TBB library, https://www.threadingbuildingblocks.org/), Microsoft [cph]
Initial release

We don't support your browser anymore

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