achubaty / renv

renv: Project environments for R.

Home Page:https://rstudio.github.io/renv/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

renv

Lifecycle: stable CRAN status R-CMD-check

Overview

The renv package (pronounced "R" "env") helps you create reproducible environments for your R projects. Use renv to make your R projects more:

Isolated: Installing a new or updated package for one project won't break your other projects, and vice versa. That's because renv gives each project its own private library.

Portable: Easily transport your projects from one computer to another, even across different platforms. renv makes it easy to install the packages your project depends on.

Reproducible: renv records the exact package versions you depend on, and ensures those exact versions are the ones that get installed wherever you go.

Installation

Install the latest version of renv from CRAN with:

install.packages("renv")

Workflow

Use renv::init() to initialize renv with a new or existing project. This will set up your project with a private library, containing all the packages you're currently using. The packages (and all the metadata needed to reinstall them) are also recorded into a lockfile, renv.lock.

As you work in your project, you will install and upgrade packages. After you've confirmed your code works as expected, call renv::snapshot() to record their versions in the lockfile.

Later, if you need to share your code with someone else or run your code on new machine, your collaborator (or you) can call renv::restore() to reinstall the specific package versions recorded in the lockfile.

Learning more

If this is your first time using renv, we strongly recommend reading the Introduction to renv vignette.

If you have a question about renv, please first check the FAQ to see whether your question has already been addressed. If it hasn't, please feel free to ask on the RStudio Community forums.

If you believe you've found a bug in renv, please file a bug (and, if possible, a reproducible example) at https://github.com/rstudio/renv/issues.

About

renv: Project environments for R.

https://rstudio.github.io/renv/

License:MIT License


Languages

Language:R 99.7%Language:Shell 0.2%Language:Batchfile 0.0%Language:Makefile 0.0%Language:CSS 0.0%