Getting Started

Installing R, RStudio, and tidyverse

All of our visualization work will be done in the open source (and free!) programming language R. You will use RStudio as the main program to access R. Think of R as an engine and RStudio as a car dashboard—R handles all the calculations and the actual statistics, while RStudio provides a nice interface for running R code.

Install R

First you need to install R itself (the engine).

  1. Go to the CRAN (Collective R Archive Network) website:

  2. Click on “Download R for XXX”, where XXX is either Mac or Windows:

  • If you use macOS, scroll down to the first .pkg file in the list of files (as of right now, it’s R-4.1.1.pkg) and download it.
  • If you use Windows, click “base” (or click on the bolded “install R for the first time” link) and download it.
  1. Double click on the downloaded file (check your Downloads folder). Click yes through all the prompts to install like any other program.

If you already have R installed, and want to update it (aim for a 4.x.x version)1

  • On Mac, you can simply download and install the newest version of R. When you restart RStudio, it will use the updated version of R.
  • On Windows, try using the package installr
    • Install and load installr: install.packages("installr") and library(installr)
    • Call the updateR() function. This will start the updating process of your R installation by: “finding the latest R version, downloading it, running the installer, deleting the installation file, copy and updating old packages to the new R installation.”

Install RStudio

Next, you need to install RStudio, the nicer graphical user interface (GUI) for R (the dashboard). Once R and RStudio are both installed, you can ignore R and only use RStudio. RStudio will use R automatically and you won’t ever have to interact with it directly.

  1. Go to the free download location on RStudio’s website:

  2. Select the installer (from the first table) that corresponds with your computer’s operating system (Windows or macOS).

  3. Double click on the downloaded file (check your Downloads folder). Click yes through all the prompts to install as per usual.

  4. Double click on the RStudio app to run it (check your applications folder or start menu).

If you already have RStudio installed and want to update it (aim for a 1.4.X version)

  • From within RStudio, go to Help > Check for Updates to install newer version of RStudio.

Install tidyverse

R packages are easy to install with RStudio.

  1. Select the packages panel (in the lower right quandrant: Files/Plots/Packages/Help), then click on “Install.” (Alternatively, in the menu bar at the top, click “Tools” –> “Install Packages…”)
  2. Type the name of the package you want (tidyverse) to install in the pop-up window, and press Install.2

If you already have tidverse installed and want to update it

  • From within RStudio, go to Tools > Check for Package Updates. If updates are available, select All (or just tidyverse), and click Install Updates.


You’re awesome and ready to start!

  1. You’ll see the R version you’re using when you first start RStudio, or type R.version.string in the console.↩︎

  2. Alternatively, you could type install.packages("tidyverse") into the console and run it.↩︎