1 Installing R and RStudio

R and RStudio are separate downloads and installations.

R is the underlying statistical computing environment. The base R system and a very large collection of packages that give you access to a huge range of statistical and analytical functionality are available from CRAN, the Comprehensive R Archive Network.

RStudio is a graphical integrated development environment (IDE) that makes using R much easier and more interactive.

You need to first install R before you install RStudio. The instructions are slightly different depending on your operating system/computer platform. Please use the relevant instruction below.

If you already have R and RStudio installed on your laptop, please make sure they are both up to date and update any packages that you already have installed.

Installation on Windows

Installing R

  1. Download the current version of R (version 4.5.1 as of 23/09/2025) from the CRAN website.
  2. Double click the .exe file that was just downloaded to launch it and install R

Installing RStudio

  1. Go to the RStudio download page
  2. Under Installers download RStudio-2025.09.0-387.exe
  3. Double click the file to install it

Installation on Apple MacBook

Installing R

Apple MacBooks come with one of two types of cpu (chip) - Intel or Apple M1/M2. A different version of R needs to be installed depending on the type of chip that is running your MacBook. So, the first thing you should do is check what chip your Mac has. Once you know this, you can download the relevant R version and install it.

  1. Click on Apple logo in top left of the screen, then chick on About This Mac. Check to see whether you have an “Intel” or an “Apple M” chip:



  1. Download the appropriate version of R for your chip from the CRAN website:
  1. Double click on the downloaded file to install R

Installing XQuartz

In order to run RStudio on Mac OS you will need to install an additional piece of software - XQuartz.

  1. Download the .pkg file from XQuartz.
  2. Double click the downloaded file to install XQuartz

Installing RStudio

Finally install RStudio:

  1. Go to the RStudio download page
  2. Under Installers select Mac OS 13+ RStudio-2025.09.0-387.dmg
  3. Double click the donwloaded file to install RStudio

Updating existing R and RStudio

If you already have R and RStudio installed, you should make sure that you are running the latest versions.

First check RStudio and update if necessary. Open RStudio, and click on Help in the menu bar and then Check for updates.

To check which version of R you are using, it is the first thing that appears in the console. If your version of R is older than version 4.5.0.

If either R or RStudio requires updating, close RStudio and then folow the relevant installation instructions for your platform (Windows or macOS).

2 Installing the tidyverse R package

In the “R intro” workshop we will be learning how to work with data using a suite of packages collectively known as “the tidyverse”. This is includes packages such as readr, dplyr and ggplot2. Rather than install each package separately we can conveniently install them all at once by installing the tidyverse package.

To install the tidyverse packages:

Start RStudio, at the console type

install.packages("tidyverse")

and then press Enter:

You should then see some messages as the tidyverse is installed:

Finally, check that the tidyverse has been installed by loading it from your library. To do this, at the console type:

library(tidyverse)

and press Enter. You should see the following message (or similar):

3 Downloading the Data

We will need various data files for the workshop. These can all be downloaded in a single zip file from here.

Please download this file and unzip in a suitable location on your laptop. We will be working within this folder for the duration of the workshop.