Skip to contents

Substitutes renv::init() to initialize a new renv project with rspm enabled. This function sets the appropriate infrastructure to activate the integration. Then, packages can be installed normally via install.packages and update.packages.

Usage

renv_init(...)

Arguments

...

Arguments to be passed to renv::init().

Value

The project directory, invisibly. This function is called for its side effects.

Details

Note that, if renv::install or renv::update are called directly, then rspm::install_sysreqs() needs to be called manually.

Examples

if (FALSE) {
# initialize a new project (with an empty R library)
rspm::renv_init()

# install 'units' and all its dependencies from the system repos
install.packages("units")

# install a specific version and install dependencies manually
renv::install("units@0.8-0")
rspm::install_sysreqs()
}