Discover the R packages used within a project, and then install those packages into the active library.
hydrate(project = NULL, library = NULL)
The project directory. If NULL
, then the active
project will be used. If no project has been specifically activated,
the current working directory is used.
The R library to be hydrated. When NULL
, the active
library as reported by .libPaths()
is used.
While this function is normally called as part of init()
, it may be useful
to call this function explicitly when working with a new project, as it
can take care of finding and installing R packages available on CRAN that
have not yet been installed on your machine.