Prerequisites and Preparations

  • You should have some basic knowledge of R, and be familiar with the topics covered in the Introduction to R.
  • Have a recent version of R and RStudio installed.
  • Install and load the tidyverse package.
  • Create a new RStudio project R-data-ws in a new folder R-data-ws. Download both CSV files into a subdirectory called data like this:
  • Download MS_trafficstops_bw_age.csv:
  • Download MS_acs2015_bw.csv:


Boehmke, Bradley C. (2016) Data Wrangling with R

Grolemund, G & Wickham, H (2017): R for Data Science

Wickham, H. (2014): Tidy Data


Part of the materials for this tutorial are adapted from and