R is a free programming language and software environment for statistical computing. RStudio is an integrated development environment (IDE) for the R programming language that allows users to interactively work with their code and understand it better.

Microsoft R Open is an enhanced distribution of R that comes bundled with multi-threaded mathematical libraries, allowing for parallel processing and faster execution times, and uses a fixed package repository, resulting in a consistent environment and better reproducibility.

Use the instructions corresponding to your operating system to install both R and RStudio on your computer.
A printer-friendly PDF version of these instructions is available on Box and via direct download.
If needed, email DataLab-Support@elist.tufts.edu for assistance.

JupyterLab users interested in R notebooks should install R following these instructions and then install IRkernel.
Installing R via conda is not recommended and likely to cause problems.

Windows

  1. Download and run the installer for your desired version of R
    1. Microsoft R Open 4.0.2 (used on all Tufts public computing infrastructure)
    2. Most recent version of base R (includes the newest features and supports the latest packages)
  2. Download and run the RStudio installer corresponding to your operating system
  3. Optional: Advanced users looking to use packages that require compilation should also install and configure Rtools

MacOS

  1. Download and run the installer for the latest version of base R depending on your processor
    1. Intel x86-64 (released 2019 or earlier)
    2. Apple Silicon M1 (released 2020 or later)
  2. Download and run the RStudio installer corresponding to your operating system
  3. Optional: Install Xcode Command Line Tools to support installation of R packages that require compilation
    1. Launch Terminal from Applications > Utilities > Terminal
    2. Type xcode-select --install and press enter
    3. If you get an error message stating that command line tools are already installed, no further action is needed
    4. If a popup window appears, click Install and agree to the Terms of Service
    5. Wait for Xcode Command Line Tools to install (this may take several minutes)
  4. Optional: Install XQuartz to use certain advanced R components and packages that rely on X11 forwarding

Linux

  1. Follow instructions specific to your Linux distribution and install the desired version of R
    1. Microsoft R Open 4.0.2 (used on all Tufts public computing infrastructure)
    2. Most recent version of base R (includes the newest features and supports the latest packages)
  2. Download and run the RStudio installer corresponding to your operating system

Last updated 2021-09-10