Copy packages from user libraries to a project librarySource:
hydrate() installs missing packages from a user library into the project
hydrate() is called automatically by
init(), and it is rare
that you should need it otherwise, as it can easily get your project into
an inconsistent state.
It may very occasionally be useful to call
hydate(update = "all") if you
want to update project packages to match those installed in your global
library (as opposed to using
update() which will get the latest versions
from CRAN). In this case, you should verify that your code continues to work,
snapshot() to record updated package versions in the lockfile.
The set of R packages to install. When
NULL, the packages found by
Unused arguments, reserved for future expansion. If any arguments are matched to
..., renv will signal an error.
The R library to be hydrated. When
NULL, the active library as reported by
The R repositories to be used. If the project depends on any R packages which cannot be found within the user library paths, then those packages will be installed from these repositories instead.
hydrate()attempt to update already-installed packages if the requested package is already installed in the project library? Set this to
"all"if you'd like all packages to be refreshed from the source library if possible.
A vector of library paths where renv should look for packages. When
hydrate()will look in the system libraries (the user library, the site library and the default library) then the renv cache.
If a package is not found in any of these locations,
hydrate()will try to install it from the active R repositories.
Boolean; prompt the user before taking any action? Ignored when
report = FALSE.
Boolean; display a report of what packages will be installed by
The project directory. If
NULL, then the active project will be used. If no project is currently active, then the current working directory is used instead.
A named R list, giving the packages that were used for hydration as well as the set of packages which were not found.