How-to: Manage R dependencies
Source:vignettes/how-to/manage-r-dependencies.Rmd
manage-r-dependencies.Rmd
Rhino uses renv to manage the R package dependencies of your project. To learn about the details and rationale for the particular setup used by Rhino, please refer to Explanation: Renv configuration.
This article offers short recipes for the most common tasks: adding, updating and removing dependencies.
Add a dependency
- Add a
library(package)
line todependencies.R
. - Call
renv::install("package")
. - Call
renv::snapshot()
.
Update a dependency
- Call
renv::update("package")
. - Call
renv::snapshot()
.
Remove a dependency
- Remove the
library(package)
line fromdependencies.R
. - Call
renv::snapshot()
. - Call
renv::restore(clean = TRUE)
.