This lesson is still being designed and assembled (Pre-Alpha version)

Introduction to R/tidyverse for Exploratory Data Analysis: Setup

If you have any problems with software installation or dowloading data, please contact your instructors before the course.

Software installation


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):

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.