Pre-course instructions
To participate in this course, you will need a computer with internet access.
To follow along with the activities with the instructor, you will need R and RStudio installed on your computer, or access to Posit Cloud, an online platform for R and RStudio. You will also need some R packages and optionally, a lateX distribution if you want to create PDF reports.
If you are using a computer provided by your organisation you may need your IT department to install the software. If that is not possible, you can use Posit Cloud instead.
Step 1: Install R and RStudio or use Posit Cloud
Use Posit Cloud
Posit Cloud is an online platform that allows you to use R and RStudio directly from your web browser, without needing to install anything on your computer. The free plan is plenty for this workshop
- Go to https://positcloud.com/
- Create a free account by clicking “Sign Up” in the top right corner
- Once logged in, click “New Project” and select “New RStudio Project”
- You can now use R and RStudio in your web browser!
Install R and RStudio on your computer
If you already have R and RStudio installed, check that you have at least R version 4.2 and RStudio version 2022.07 or later. If not, please install the latest versions by following the instructions below. Quarto comes with recent versions of RStudio and does not need to be installed separately.
Windows
- Install R:
- Go to https://cran.r-project.org/bin/windows/base/
- Click “Download R-4.x.x for Windows” (where x.x is the latest version number)
- Run the downloaded
.exefile and follow the installation wizard - Accept the default settings
- Install RStudio:
- Go to https://posit.co/download/rstudio-desktop/
- Click “Download RStudio Desktop for Windows”
- Run the downloaded
.exefile and follow the installation wizard - Accept the default settings
Mac
- Install R:
- Go to https://cran.r-project.org/bin/macosx/
- Download the
.pkgfile for your Mac:- For Apple Silicon Macs (M1, M2, M3): Download the “arm64” version
- For Intel Macs: Download the “x86_64” version
- Open the downloaded
.pkgfile and follow the installation wizard - Accept the default settings
- Install RStudio:
- Go to https://posit.co/download/rstudio-desktop/
- Click “Download RStudio Desktop for macOS”
- Open the downloaded
.dmgfile - Drag the RStudio icon to your Applications folder
Linux
Install R:
- Open a terminal
- For Ubuntu/Debian:
sudo apt update sudo apt install r-base r-base-dev- For Fedora:
sudo dnf install R- For other distributions, see https://cran.r-project.org/bin/linux/
Install RStudio:
- Go to https://posit.co/download/rstudio-desktop/
- Download the appropriate
.deb(Ubuntu/Debian) or.rpm(Fedora/RedHat) file - For Ubuntu/Debian:
sudo dpkg -i rstudio-*.deb sudo apt install -f- For Fedora:
sudo dnf install rstudio-*.rpm
Step 2: Install packages
We will use several R packages during the workshop. To install them, download setup.R from the course website and open it in RStudio and run it by clicking “Source” in the top right corner of the script editor.
If you are using Posit Cloud, use the “Upload” button in the Files pane to upload setup.R, then open it and click “Source”.