Skip to content

Adds infrastructure commonly needed when using compiled code:

  • Creates src/

  • Adds required packages to DESCRIPTION

  • May create an initial placeholder .c or .cpp file

  • Creates Makevars and Makevars.win files (use_rcpp_armadillo() only)

Usage

use_rcpp(name = NULL)

use_rcpp_armadillo(name = NULL)

use_rcpp_eigen(name = NULL)

use_c(name = NULL)

Arguments

name

If supplied, creates and opens src/name.{c,cpp}.

Details

When using compiled code, please note that there must be at least one file inside the src/ directory prior to building the package. As a result, if an empty src/ directory is detected, either a .c or .cpp file will be added.