Learn R Programming

⚠️There's a newer version (1.1.4) of this package.Take me there.

renv

Overview

The renv package is a new effort to bring private project-local R libraries to your projects. The goal is for renv to be a robust, stable replacement for the Packrat package, with fewer surprises and better default behaviors.

Workflow

The general workflow when working with renv is:

  1. Call renv::init() to initialize a new project-local environment, with a private R library;

  2. Work in the project as normal, installing and removing new R packages as they are needed in the project,

  3. Call renv::snapshot() to save the state of the project library to the lockfile (called renv.lock),

  4. Call renv::restore() to restore the state of the project library, based on the state of the lockfile previously generated by renv::snapshot().

See the Introduction vignette for more details.

Copy Link

Version

Install

install.packages('renv')

Monthly Downloads

968,614

Version

0.1.0-118

License

MIT + file LICENSE

Maintainer

Kevin Ushey

Last Published

March 20th, 2025

Functions in renv (0.1.0-118)

equip

Install Required System Libraries
paths

Path Customization
project

Retrieve the Active Project
snapshot

Snapshot a Project
status

Status
install

Install Packages
load

Load a Project
renv-package

Project-local Environments for R
restore

Restore a Project
revert

Revert Lockfile
settings

Settings
hydrate

Hydrate a Project
init

Initialize a Project
purge

Purge Packages from the Cache
activate

Activate a Project
lockfile

Lockfiles
clean

Clean a Project
remove

Remove Packages
deactivate

Deactivate a Project
modify

Open the Lockfile for Editing
upgrade

Upgrade renv
dependencies

Find R Package Dependencies in a Project
history

View Lockfile History