If you have any problems with software installation or dowloading data, please contact your instructors before the course.
Software installation
- Download R and install it using default options. (Note: choose the “base” version for Windows)
- Download RStudio and install it using default options.
- Install required R packages:
- open RStudio and from the upper menu press Tools > Install Packages...
- under “Packages” type:
tidyverse,naniar
- press Install (a lot of text will start printing on the panel called “Console”)
Testing your installation
On the RStudio panel named “Console” type library(tidyverse)
and press Enter
A message similar to this should print:
── Attaching packages ─────────────────────────────────────────────────────────────────── tidyverse 1.2.1 ──
✔ ggplot2 3.2.1 ✔ purrr 0.3.2
✔ tibble 2.1.3 ✔ dplyr 0.8.3
✔ tidyr 1.0.0 ✔ stringr 1.4.0
✔ readr 1.3.1 ✔ forcats 0.4.0
── Conflicts ────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
If instead you get the message:
Error in library(tidyverse) : there is no package called ‘tidyverse’
then your package installation did not work. Please ask the instructors for assistance before the course.
Setting up RStudio
After installing RStudio, change some of its default options (you only need to do this once):
- From the upper menu go to Tools > Global Options...
- Untick the option “Restore .RData to workspace on startup.”
- Change “Save workspace to .RData on exit” option to “Never”
- Press OK
Getting data
On your computer create a folder called r-workshop
(or other name of your choice).
Within that folder create a folder called data
and within that another folder called
raw
. Schematically:
r-workshop/
└── data
└── raw
Download the following files and save them in the data/raw
folder (right-click
the file link and choose “Save link as…”):
Note: these data were slightly modified from the original and should not be used for research.