Prerequisites

Before coming to the workshop, you will need a laptop that has R, R Studio, and the ‘tidyverse’ package installed on it.

The next few slides detail how to install these three components.

Installing R

To download R, go to CRAN, the Comprehensive R Archive Network, https://cloud.r-project.org.

Choose one of the links at the top based on your operating system (MacOS or Windows).

On the next page, choose the base version to download.

Install after downloading with all the default settings.

Installing R Studio

Using R without R studio is like going on vacation and staying in your hotel all day - not fun.

RStudio is an integrated development environment, or IDE, for R programming, which you can download from https://posit.co/download/rstudio-desktop/.

It’s basically a wrapper for the R language that makes it nicer to look at and easier to interact with.

Install after downloading with all the default settings.

Tidyverse package

You’ll also need to install some R packages. An R package is a collection of functions, data, and documentation that extends the capabilities of base R. Most of the cool stuff you can do with R relies on packages outside of base R. We’ll only need to install a single package for now, called ‘tidyverse’. Open up R Studio for the first time and it should look like this.

Figure 1: R Studio when you first boot it up

Figure 1: R Studio when you first boot it up

Installing ‘tidyverse’ package

The ‘tidyverse’ package is the biggest out there, so it takes some time to install, which is why I don’t want to do this in-person. In the left hand box (where you see your typing cursor) type install.packages("tidyverse") like you see in the image below, and then press enter. R will start going crazy with red text, which means it’s downloading and installing all the parts of the package.

Figure 2: installing packages in R in the console

Figure 2: installing packages in R in the console

Successful install

You’ll know the package has been successfully installed when R stops printing red text, the little stop button disappears, and the text output looks like figure 3.

Success! Now you’re ready to begin using R, R Studio, and the ‘tidyverse’ package.

You’re set up for the R workshop.

Figure 3: Tidyverse package is now installed

Figure 3: Tidyverse package is now installed