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.3.0-64

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Kevin Ushey

Last Published

March 20th, 2025

Functions in renv (0.3.0-64)

deactivate

Deactivate a Project
load

Load a Project
hydrate

Hydrate a Project
project

Retrieve the Active Project
lockfile

Lockfiles
purge

Purge Packages from the Cache
install

Install Packages
init

Initialize a Project
restore

Restore a Project
activate

Activate a Project
revert

Revert Lockfile
snapshot

Snapshot a Project
clean

Clean a Project
settings

Project Settings
status

Status
upgrade

Upgrade renv
dependencies

Find R Package Dependencies in a Project
remove

Remove Packages
equip

Install Required System Libraries
renv-package

Project-local Environments for R
use_python

Use Python
modify

Open the Lockfile for Editing
paths

Path Customization
config

User-Level Configuration of renv
history

View Lockfile History