hydrate {renv} | R Documentation |
Discover the R packages used within a project, and then install those packages into the active library. This effectively allows you to clone the state of your default R libraries for use within a project library.
hydrate(packages = NULL, ..., library = NULL, sources = NULL, project = NULL)
packages |
The set of R packages to install. When |
... |
Unused arguments, reserved for future expansion. If any arguments
are matched to |
library |
The R library to be hydrated. When |
sources |
A set of library paths from which |
project |
The project directory. If |
A named R list, giving the packages that were used for hydration as well as the set of packages which were not found.
hydrate()
attempts to re-use packages already installed on your system,
to avoid unnecessary attempts to download and install packages from remote
sources. When NULL
(the default), hydrate()
will attempt to discover R
packages from the following sources (in order):
The user library,
The site library,
The system library,
The renv
cache.
If package is discovered in one of these locations, renv
will attempt to
copy or link that package into the requested library as appropriate.
If renv
discovers that your project depends on R packages not currently
installed in your user library, then it will attempt to install those
packages from the active R repositories.
## Not run: # hydrate the active library renv::hydrate() ## End(Not run)