LCM Logo
Programming

R

Installation

Install rig

Our recommendation is to use rig to install and manage R versions. You can install rig using Homebrew on macOS or Linux:

brew tap r-lib/rig
brew install --cask rig

You can use Scoop on Windows:

scoop bucket add r-bucket https://github.com/cderv/r-bucket.git
scoop install rig

Install R

You can install the latest version of R using rig:

rig install release

Optional: Create a new project

In R, you don't have to install dependencies for each project separately. Version conflicts are very rare and maintaining a global package library is the default and recommended way of working with R. This avoids unnecessary duplication of packages on your disk.

If you do want to create a new R project, you can create a project-specific environment using renv.

On this page