The R computing environment has become one of the most important tools in quantitative research, from computational biology to financial modeling. This short workshop will expose participants to the basic elements of R through a hands-on analysis of the Divvy bike trip data. No previous programming experience is required. The aim is to provide participants with the basic tools to analyze data in R or RStudio, either on the RCC cluster, or on their own computer. Specific skills participants will learn include:
-
Importing data from CSV files;
-
Summarizing and processing data in data frames;
-
Installing and using R packages; and
-
Plotting data using ggplot2.
This is an introductory level workshop, for users with little or no experience in the topic.
All participants are expected to have a laptop or desktop computer with a Mac, Linux, or Windows operating system that they have administrative privileges on. An RCC account is not required.
Here is an overview of some of the files included in this git repository (the "workshop packet"):
-
README.md: This file.
-
conduct.md: Code of Conduct.
-
LICENSE.md: License information for the materials in this repository.
-
slides.pdf: The slides for the workshop.
-
slides.Rmd: R Markdown source used to generate these slides.
-
Divvy_Stations_2017_Q3Q4.csv: Divvy station data downloaded from the Divvy website.
-
Divvy_Trips_2019_Q4.csv.gz: 2019 Divvy trip data downloaded from the Divvy website.
-
read_trip_data.R: Some R code used in the hands-on examples.
-
Makefile: GNU Makefile containing commands to generate the slides from the R Markdown source.
-
This workshop attempts to apply elements of the Software Carpentry approach. See also this article. Please also take a look at the Code of Conduct, and the license information.
-
To generate PDFs of the slides from the R Markdown source, run
make slides
in the root directory of the git repository. For this to work, you will need to to install the rmarkdown package in R, as well as the packages used in slides.Rmd. For more details, see the Makefile. -
See also the instructor notes.
These materials were developed by Peter Carbonetto at the University of Chicago. Thank you to Matthew Stephens for his support and guidance.