Introduction to the R tidyverse

Erik Erhardt

Course website: Course materials

Short course for the Albuquerque Chapter of the American Statistical Association (ACASA)

Prof. Erik Erhardt

Date: February 16, 2018

Time: 12:30-5pm

Location: Student Union Building at the University of New Mexico - Fiesta Rooms A&B




Introduction to the R tidyverse:

Explore, wrangle, program, and communicate, reproducibly


An afternoon course introducing what the Tidyverse is, reasons for using it, the tools available in it, and an overview with exercises of its core functionality.


This afternoon short course will introduce participants to the R Tidyverse, a set of unified packages covering the data analysis workflow implementing a single philosophy (making it easy to learn and use). Prior R programming experience is required. Through interactive lectures of R programming concepts, examples, and exercises, this course will guide participants through the 18 packages used for the steps of importing, wrangling, visualizing, and exploring data and then communicating the results. Participants will gain a high-level perspective of the data analysis cycle along with the tools needed for managing the details.

Participants will receive an electronic copy of all course materials, including lecture slides, practice datasets, software scripts, relevant supporting documentation, and recommended readings.

Skills Prerequisites


Not required but advantageous:

No level of proficiency beyond basic awareness is assumed for skills related to:


Friday February 16, 2018
12:30 Course outcomes, data and materials
12:35 Tidyverse workflow and packages
12:45 RStudio and R Markdown
 1:00 Tibble
 1:25 Import
 2:00 Snack and refreshment break
 2:10 Tidy
 2:50 Snack and refreshment break
 3:00 Visualize
 3:25 Transform 1-4: f, a, s, m
 3:55 Snack and refreshment break
 4:05 Transform 5-8: s, g, r, more
 4:40 Model
 4:45 Program
 4:50 Communicate
 4:55 Resources
 5:00 Conclude


Prof. Erik Erhardt, PhD, is an Associate Professor of Statistics and Teaching Fellow in the Department of Mathematics and Statistics at the University of New Mexico. He has strong interests in graduate and undergraduate education, statistical computing and programming, Bayesian statistical methods, scientific replication, and data visualization. He has an invited book chapter on Visualizing Scientific Data in the Handbook of Psychophysiology (2017), extensive published lecture notes and course projects in advanced data analysis and statistical computing, and several R packages dating back to 2007. His research interests include Bayesian and Frequentist statistical methods for human brain imaging and ecological stable isotope sourcing.

Software and Computer Support

Software requirements

Participants need to bring a laptop computer with Wi-Fi capabilities with the current version of R and RStudio installed; both are free and available for Windows, Mac, and Linux at and

Local course folder

Create a folder on your computer for all the course materials, such as "tidyverse". Save all materials there.

R packages

Installing the flightsABQ17 data package

  1. Install the devtools package: Following instructions at under the first section, "Updating to the latest version of devtools".

  2. Install the flightsABQ17 package from github:


Packages to install and update

pkg_list <- c("tidyverse", "gridExtra")         # packages to install
install.packages(pkg_list, dependencies = TRUE) # install
update.packages(checkBuilt = TRUE, ask = FALSE) # update all packages

Course Materials