Given a set of R package requirements, install those packages into the
library path requested via
library, and then activate that library path.
use(..., library = NULL, isolate = FALSE, attach = TRUE, verbose = FALSE)
The R packages to be used with this script.
The library path into which the requested packages should be installed.
Boolean; should the active library paths be included in the set of library
paths activated for this script? Set this to
Boolean; should the set of requested packages be automatically attached?
Boolean; be verbose while installing packages?
This function is normally called for its side effects.
renv::use() is intended to be used within standalone R scripts. It can
be useful when you'd like to specify an R script's dependencies directly
within that script, and have those packages automatically installed and
loaded when the associated script is run. In this way, an R script can more
easily be shared and re-run with the exact package versions requested via
renv::use() is inspired in part by the groundhog
package, which provides an alternate mechanism for specifying a script's
R package requirements within that same R script.