renv
Overview
The renv package is a new effort to bring private project-local R libraries
to your projects. The goal is for renv to be a robust, stable replacement for
the Packrat package, with fewer surprises
and better default behaviors.
Workflow
The general workflow when working with renv is:
Call
renv::init()to initialize a new project-local environment, with a private R library;Work in the project as normal, installing and removing new R packages as they are needed in the project,
Call
renv::snapshot()to save the state of the project library to the lockfile (calledrenv.lock),Call
renv::restore()to restore the state of the project library, based on the state of the lockfile previously generated byrenv::snapshot().
See the Introduction vignette for more details.