- packages
Either NULL
(the default) to install all packages required
by the project, or a character vector of packages to install. renv
supports a subset of the remotes syntax used for package installation,
e.g:
pkg
: install latest version of pkg
from CRAN.
pkg@version
: install specified version of pkg
from CRAN.
username/repo
: install package from GitHub
bioc::pkg
: install pkg
from Bioconductor.
See https://remotes.r-lib.org/articles/dependencies.html and the examples
below for more details.
renv deviates from the remotes spec in one important way: subdirectories
are separated from the main repository specification with a :
, not /
.
So to install from the subdir
subdirectory of GitHub package
username/repo
you'd use "username/repo:subdir
.
- ...
Unused arguments, reserved for future expansion. If any arguments
are matched to ...
, renv will signal an error.
- exclude
Packages which should not be installed. exclude
is useful
when using renv::install()
to install all dependencies in a project,
except for a specific set of packages.
- library
The R library to be used. When NULL
, the active project
library will be used instead.
- type
The type of package to install ("source" or "binary"). Defaults
to the value of getOption("pkgType")
.
- rebuild
Force packages to be rebuilt, thereby bypassing any installed
versions of the package available in the cache? This can either be a
boolean (indicating that all installed packages should be rebuilt), or a
vector of package names indicating which packages should be rebuilt.
- repos
The repositories to use when restoring packages installed
from CRAN or a CRAN-like repository. By default, the repositories recorded
in the lockfile will be used, ensuring that (e.g.) CRAN packages are
re-installed from the same CRAN mirror.
Use repos = getOption("repos")
to override with the repositories set
in the current session, or see the repos.override
option in config for
an alternate way override.
- prompt
Boolean; prompt the user before taking any action? For backwards
compatibility, confirm
is accepted as an alias for prompt
.
- dependencies
A vector of DESCRIPTION field names that should be used
for package dependency resolution. When NULL
(the default), the value
of renv::settings$package.dependency.fields
is used. The aliases
"strong", "most", and "all" are also supported.
See tools::package_dependencies()
for more details.
- verbose
Boolean; report output from R CMD build
and R CMD INSTALL
during installation? When NULL
(the default), the value of config$install.verbose()
will be used. When FALSE
, installation output will be emitted only if
a package fails to install.
- lock
Boolean; update the renv.lock
lockfile after the successful
installation of the requested packages?
- project
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.