renv: Project Environments for R
summary
Creates project-local R libraries by forking the current library on rnv init and writing a lockfile (renv.lock) so snapshot/restore can reinstall exact package versions from CRAN, Bioconductor, GitHub, GitLab or private repos with authentication. Uses a global cache of package installations and links into project libraries to avoid repeated installs and shrink disk use — author reports a tidyverse install taking ~6–7 minutes without caching. Lockfile is JSON and is intended for time capsules, collaboration, and deployment.
AI-written summary · about
chapters (14)
- 0:00What this talk covers
- 0:40The problem: why an R project breaks later
- 1:17What Packrat was, and what it taught us
- 4:08How R finds packages: the lay of the land
- 5:13What a library path is
- 8:13The challenge: one library, many projects
- 10:01The solution: a project library and a lockfile
- 10:51Initialising renv in a project
- 13:09Saving and loading the project state
- 13:41snapshot: recording what you have
- 14:42What a lockfile records, with an example
- 15:56restore: rebuilding the environment
- 17:48The global package cache
- 19:15How package installation works with renv
related talks
21m{slushy}: A Bridge to the Future
05mReproducible Build Environments with Nix
45mHow to Automate Dependency Updates with the Renovate@Roche Bot
45mHow to Automate Dependency Updates with the Renovate@Roche Bot
16mSaving time (and pain) with Posit Public Package Manager
23mReproducible Environments for Reproducible Results
33mAutomated update management with
29mProductionizing R scripts in the cloud
