hydrate | R Documentation |
hydrate()
installs missing packages from a user library into the project
library. 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 hydrate(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,
then call snapshot()
to record updated package versions in the lockfile.
hydrate(
packages = NULL,
...,
library = NULL,
repos = getOption("repos"),
update = FALSE,
sources = NULL,
prompt = interactive(),
report = TRUE,
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 |
repos |
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. |
update |
Boolean; should |
sources |
A vector of library paths where renv should look for packages.
When If a package is not found in any of these locations, |
prompt |
Boolean; prompt the user before taking any action? Ignored
when |
report |
Boolean; display a report of what packages will be installed
by |
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.
## Not run:
# hydrate the active library
renv::hydrate()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.