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

use_rcpp

Use C, C++, RcppArmadillo, or RcppEigen


Description

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.


usethis

Automate Package and Project Setup

v2.0.1
MIT + file LICENSE
Authors
Hadley Wickham [aut] (<https://orcid.org/0000-0003-4757-117X>), Jennifer Bryan [aut, cre] (<https://orcid.org/0000-0002-6983-2759>), RStudio [cph, fnd]
Initial release

We don't support your browser anymore

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