| Title: | Robust 'renv' Package Restore and Update Functions |
|---|---|
| Description: | Provides more robust 'renv' restore and update functions that continue past individual package failures, retry them individually, and report what could not be installed. Unlike the standard 'renv::restore()', which stops on the first error, these functions allow the installation process to proceed for all packages that can be successfully restored. |
| Authors: | Miguel Rodo [aut, cre] (ORCID: <https://orcid.org/0000-0002-2036-4878>) |
| Maintainer: | Miguel Rodo <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.4.2 |
| Built: | 2026-06-04 17:53:34 UTC |
| Source: | https://github.com/MiguelRodo/renvvv |
A "tryhard" version of renv::install(). It first attempts to install all
specified packages in a single vectorized call. If that fails, it compares
the current installed packages and their versions against the state prior
to the installation attempt. Any package that is still missing or whose
version did not change will then be installed individually, ensuring that
one failing package does not prevent the installation of others.
renvvv_install(packages, prompt = FALSE, args_install = list())renvvv_install(packages, prompt = FALSE, args_install = list())
packages |
A character vector of packages to install. Can contain CRAN,
Bioconductor, or GitHub package references (e.g., |
prompt |
Logical. Whether to prompt for user confirmation during
installation. Default is |
args_install |
List. Arbitrary arguments to pass down to |
Invisibly returns TRUE upon completion.
## Not run: # Install multiple packages robustly renvvv_install(c("dplyr", "ggplot2", "SATVILab/projr@dev")) # Pass arbitrary parameters down to renv::install renvvv_install(c("dplyr"), args_install = list(rebuild = TRUE)) ## End(Not run)## Not run: # Install multiple packages robustly renvvv_install(c("dplyr", "ggplot2", "SATVILab/projr@dev")) # Pass arbitrary parameters down to renv::install renvvv_install(c("dplyr"), args_install = list(rebuild = TRUE)) ## End(Not run)
Restores packages from the lockfile, attempting to install the lockfile versions. When individual packages fail, continues with the remaining packages and retries failures individually.
If an renv project is detected (via renv.lock file) but not currently
active, the function will activate it. In interactive sessions, the user
will be prompted for confirmation before activation. In non-interactive
sessions, activation occurs automatically.
renvvv_restore( github = TRUE, non_github = TRUE, biocmanager_install = FALSE, skip = character(0), prompt = FALSE, transactional = FALSE, args_restore = list(), args_install = list() )renvvv_restore( github = TRUE, non_github = TRUE, biocmanager_install = FALSE, skip = character(0), prompt = FALSE, transactional = FALSE, args_restore = list(), args_install = list() )
github |
Logical. Whether to process GitHub packages. Default is |
non_github |
Logical. Whether to process non-GitHub packages
(CRAN and Bioconductor). Default is |
biocmanager_install |
Logical.
If |
skip |
Character vector. Package names to skip during restore.
Default is |
prompt |
Logical. Whether to prompt for user confirmation during renv
operations. Default is |
transactional |
Logical. Whether to use transactional package
restoration. Default is |
args_restore |
List. Arbitrary arguments to pass down to |
args_install |
List. Arbitrary arguments to pass down to |
Invisibly returns TRUE upon successful completion.
## Not run: # Restore all packages renvvv_restore() # Only restore non-GitHub packages renvvv_restore(github = FALSE) # Pass clean = FALSE to renv::restore renvvv_restore(args_restore = list(clean = FALSE)) ## End(Not run)## Not run: # Restore all packages renvvv_restore() # Only restore non-GitHub packages renvvv_restore(github = FALSE) # Pass clean = FALSE to renv::restore renvvv_restore(args_restore = list(clean = FALSE)) ## End(Not run)
First restores packages from the lockfile, then updates them to the latest
versions. Combines renvvv_restore() and renvvv_update() in sequence.
If an renv project is detected (via renv.lock file) but not currently
active, the function will activate it. In interactive sessions, the user
will be prompted for confirmation before activation. In non-interactive
sessions, activation occurs automatically.
renvvv_restore_and_update( github = TRUE, non_github = TRUE, biocmanager_install = FALSE, skip = character(0), skip_if_dep_unavailable = TRUE, prompt = FALSE, transactional = FALSE, args_restore = list(), args_update = list(), args_install = list() )renvvv_restore_and_update( github = TRUE, non_github = TRUE, biocmanager_install = FALSE, skip = character(0), skip_if_dep_unavailable = TRUE, prompt = FALSE, transactional = FALSE, args_restore = list(), args_update = list(), args_install = list() )
github |
Logical. Whether to process GitHub packages. Default is |
non_github |
Logical. Whether to process non-GitHub packages
(CRAN and Bioconductor). Default is |
biocmanager_install |
Logical.
If |
skip |
Character vector. Package names to skip during restore and update.
Default is |
skip_if_dep_unavailable |
Logical. Passed to |
prompt |
Logical. Whether to prompt for user confirmation during renv
operations. Default is |
transactional |
Logical. Whether to use transactional package
restoration. Default is |
args_restore |
List. Arbitrary arguments to pass down to |
args_update |
List. Arbitrary arguments to pass down for update operations. |
args_install |
List. Arbitrary arguments to pass down to |
Invisibly returns TRUE upon successful completion.
Updates packages to their latest available versions, ignoring the lockfile versions. When individual packages fail, continues with the remaining packages and retries failures individually.
If an renv project is detected (via renv.lock file) but not currently
active, the function will activate it. In interactive sessions, the user
will be prompted for confirmation before activation. In non-interactive
sessions, activation occurs automatically.
renvvv_update( github = TRUE, non_github = TRUE, biocmanager_install = FALSE, skip = character(0), skip_if_dep_unavailable = TRUE, prompt = FALSE, transactional = FALSE, args_update = list(), args_install = list() )renvvv_update( github = TRUE, non_github = TRUE, biocmanager_install = FALSE, skip = character(0), skip_if_dep_unavailable = TRUE, prompt = FALSE, transactional = FALSE, args_update = list(), args_install = list() )
github |
Logical. Whether to process GitHub packages. Default is |
non_github |
Logical. Whether to process non-GitHub packages
(CRAN and Bioconductor). Default is |
biocmanager_install |
Logical.
If |
skip |
Character vector. Package names to skip during update.
Default is |
skip_if_dep_unavailable |
Logical. If |
prompt |
Logical. Whether to prompt for user confirmation during renv
operations. Default is |
transactional |
Logical. Whether to use transactional package
restoration. Default is |
args_update |
List. Arbitrary arguments to pass down for update operations. |
args_install |
List. Arbitrary arguments to pass down to |
Invisibly returns TRUE upon successful completion.