We’re thrilled to announce the release of renv 1.0.0. renv has been around since 2019 as the successor to packrat, but this is the first time (!!) we’re blogging about it. renv helps you make reproducible environments for your R projects, keeping the packages used for each project isolated and making it easy to reinstall the exact versions on other machines. It’s a powerful tool for long-term reproducibility since you can easily install the exact package versions that you used when you wrote the code, and for deployment, since you can easily install the exact package versions on a different machine.
You can grab the latest version with:
This is a 1.0.0 release which recognises that renv is a mature product that has evolved through 30 releases in the last 4 years. This release doesn’t contain any major new features, but there are a number of minor improvements that will make your life easier. The most important changes in this release are summarised below, and you can read the complete list in the release notes:
- We performed a thorough review of the renv introductory documentation, focusing on the README, the getting started vignette, and the documentation for the most important functions (
renv::restore()). We hope this will make it easier to get started using renv, or if you’re already a user, to persuade your friends to use it too 😄.
- We’ve also taken a look at the majority of user messaging that renv produces, aiming to make all messages more consistent, more clear, and to provide more actionable insight. For example, one change that should make reviewing renv logs a little easier is that installing a package now generates just one line of output (instead of potentially four). We’ve also have a new display for
renv::status()that should make it easier to understand inconsistencies in your project state.
- The new
renv::checkout()makes it easy to use packages as if they’d all been installed at a specified date. For example,
renv::checkout(date = "2023-02-08")will re-install all packages as they were on 2023-02-08 (using Posit Package Manager).
renv::dependencies()now discovers R dependencies inside Jupyter notebooks.
- We’ve tweaked the handling of “development” dependencies, i.e., packages that you need when working on your project but don’t need when deploying it elsewhere.
renv::status()no longer record or report on development dependencies, while
renv::install()will install them. Additionally, if you have set
options(renv.config.user.profile = TRUE), then packages used in your user
.Rprofilewill be included as development dependencies, so
renv::install()will install them when needed.
- New projects will now use Posit Public Package Manager by default so that you’re more likely to get binaries. See the options
?configfor more details.
- MRAN integration is now disabled by default, pending the upcoming shutdown of Microsoft’s MRAN service. Users who require binaries of older R packages on Windows + macOS can consider using the instance of CRAN mirrored by the Posit Public Package Manager (#1343).