Initializes renv setup by setting a predefined RStudio Package
Manager (RSPM) snapshot.
Custom RSPM Snapshots can be configured via snapshot_date
.
Arguments
- snapshot_date
[Date]
A valid RSPM snapshot date. By default the "recommended" date fromget_snapshots()
for the respective R version is chosen.- exclude
[character]
Packages to exclude fromrenv::install()
. Useful if a package is not available in the available repositories (check withgetOption("repos"
) to preventinit_renv()
to fail. This should only be a temporary workaround - consider making local packages available in a minicran-like repository.- convenience_pkgs
[logical]
Install additional opinionated convenience packages? The following packages would be installed:usethis
styler
gert
krlmlr/fledge
Details
During the process, the latest CRAN version of renv will be installed, regardless of the chosen snapshot ID.
The heuristic for setting the correct RSPM binary repo currently only supports Windows, macOS and Ubuntu 20.04.
The initialization mostly runs in clean vanilla sessions started with
callr::r_vanilla()
.