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

377,391

Version

0.4.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Kevin Ushey

Last Published

March 20th, 2025

Functions in renv (0.4.0)

dependencies

Find R Package Dependencies in a Project
hydrate

Hydrate a Project
renv-package

Project-local Environments for R
load

Load a Project
lockfile

Lockfiles
snapshot

Snapshot a Project
settings

Project Settings
restore

Restore a Project
init

Initialize a Project
upgrade

Upgrade renv
status

Status
equip

Install Required System Libraries
use_python

Use Python
revert

Revert Lockfile
install

Install Packages
project

Retrieve the Active Project
activate

Activate a Project
purge

Purge Packages from the Cache
clean

Clean a Project
modify

Open the Lockfile for Editing
paths

Path Customization
history

View Lockfile History
config

User-Level Configuration of renv
deactivate

Deactivate a Project
remove

Remove Packages