Install and set up R and RStudio



Before the workshop starts, you’ll need to install both R (the programming language) and RStudio (the editor/IDE we’ll use to interact with R). If you can, you should also install two R packages. The instructions to do so follow below.

Join the Office Hours if you have issues or questions

If you experience issues or have questions about any of this, please come see us at the Office Hours session from 1-3 pm on February 7th (The Zoom link will be sent to you after registration).


1 Install R and RStudio

Installation on Windows:

  1. Install R: download and run this .exe file from CRAN.

  2. Install RStudio: Click the download button below “Install RStudio” on this page.

The video below goes through this process:

Install as administrator if possible

Note that if you have separate user and admin accounts, you should run the installers as administrator (right-click on the .exe file and select “Run as administrator” instead of double-clicking). Otherwise problems may occur later, for example when installing R packages.

Installation on MacOS:

  1. Install R: download and run this .pkg file from CRAN.

  2. Install RStudio: Click the download button below “Install RStudio” on this page.

The video below goes through this process:

Installation on Linux:

  1. Install R: Instructions for R installation on various Linux platforms (Debian, Fedora, Redhat, and Ubuntu) can be found at https://cran.r-project.org/bin/linux/.

  2. Install RStudio: Click the download button below “Install RStudio” on this page.


2 Install two R packages

If you are comfortable doing so, please install two so-called R packages (basically, add-ons to the functionality of the language) that we will be using during the workshop:

  1. Open RStudio on your computer

  2. In RStudio, find the R “Console”: this is one of the tabs in the bottom left pane

  3. Type or paste the following commands in the Console, pressing Enter (Return) after each:

    • install.packages("gapminder")
    • install.packages("tidyverse")
  4. You should see lots of text stream by in the Console while the installation is going on. When it’s done, test that the packages were successfully installed:

    • library(gapminder)
    • library(tidyverse)

    The first command should produce no output, but the second should, similar to what’s shown in this screenshot:


Back to top