cpp_vendor {cpp11armadillo}R Documentation

Vendor the cpp11 and cpp11armadillo dependency

Description

Vendoring is the act of making your own copy of the 3rd party packages your project is using. It is often used in the go language community.

Usage

cpp_vendor(dir = NULL, subdir = "/inst/include")

Arguments

dir

The directory to vendor the code into.

subdir

The subdirectory to vendor the code into.

Details

This function vendors cpp11 and cpp11armadillo into your package by copying the cpp11 and cpp11armadillo headers into the 'inst/include' folder and adding 'cpp11 version: XYZ' and 'cpp11armadillo version: XYZ' to the top of the files, where XYZ is the version of cpp11 and cpp11armadillo currently installed on your machine.

Vendoring places the responsibility of updating the code on you. Bugfixes and new features in cpp11 and cpp11armadillo will not be available for your code until you run 'cpp_vendor()' again.

Value

The file path to the vendored code (invisibly).

Examples

# create a new directory
dir <- tempdir()
dir.create(dir)

# vendor the cpp11 headers into the directory
cpp_vendor(dir)

[Package cpp11armadillo version 0.2.8 Index]