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.

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 or mamba is not recommended and likely to cause problems.

Windows

  1. Download and run the installer for the lastest version of R available for your processor
    1. Latest version of R (supports modern 64-bit processors and is suitable for most users)
    2. R 4.1.3 (last version of R to support legacy 32-bit processors)
  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 R available for 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
  2. Download and run the RStudio installer corresponding to your operating system

Last updated 2022-04-14