Update packages which are currently out-of-date. Currently, only CRAN and GitHub package sources are supported.
update(
packages = NULL,
...,
exclude = NULL,
library = NULL,
rebuild = FALSE,
check = FALSE,
prompt = interactive(),
project = NULL
)
A character vector of R packages to update. When NULL
(the default), all packages will be updated.
Unused arguments, reserved for future expansion. If any arguments
are matched to ...
, renv
will signal an error.
A set of packages to explicitly exclude from updating.
Use renv::update(exclude = <...>)
to update all packages except for
a specific set of excluded packages.
The R library to be used. When NULL
, the active project
library will be used instead.
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.
Boolean; check for package updates without actually installing available updates? This is useful when you'd like to determine what updates are available, without actually installing those updates.
Boolean; prompt the user before taking any action? For backwards
compatibility, confirm
is accepted as an alias for prompt
.
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 list of package records which were installed by renv
.
Updates will only be checked from the same source -- for example, if a package was installed from GitHub, but a newer version is available on CRAN, that updated version will not be seen.
You can call renv::update()
with no arguments to update all packages within
the project, excluding any packages ignored via the ignored.packages
project setting. Use the exclude
argument to further refine the exclusion
criteria if desired.
# NOT RUN {
# update the 'dplyr' package
renv::update("dplyr")
# }
Run the code above in your browser using DataLab