| plan | R Documentation |
renv::plan() resolves the packages required by a project and generates
a lockfile, without installing any packages. This allows you to see what
renv::restore() would do before actually performing the installation.
plan(
packages = NULL,
...,
dependencies = NULL,
lockfile = paths$lockfile(project = project),
project = NULL
)
packages |
The packages to be included in the plan. When |
... |
Unused arguments, reserved for future expansion. If any arguments
are matched to |
dependencies |
A vector of DESCRIPTION field names that should be used
for package dependency resolution. When |
lockfile |
The path where the generated lockfile should be written.
Use |
project |
The project directory. If |
Because packages are not installed, the generated lockfile is based on
package metadata from the configured repositories (i.e. the PACKAGES
file). This means the lockfile may contain only a subset of the fields
that would be present in a lockfile generated by snapshot(),
which reads the full DESCRIPTION from installed packages. The
generated lockfile is still suitable for use with restore().
The generated lockfile, invisibly.
## Not run:
# plan the packages required by the current project
renv::plan()
# plan a specific set of packages
renv::plan(packages = c("dplyr", "ggplot2"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.