Skip to main content
Go to Week 1 Lesson

Required Data Files
None

Optional Reading
None

This Lesson Covers
  • What’s an Open Lab?
  • Why R?
  • Learning objectives for the semester
  • Setup: R, R Studio
  • A quick example
This Lesson Covers
  • Reproducibility
  • Projects in RStudio
  • Importing data
  • Objects and classes
  • Tables for categorical data
  • Exploring continuous data
  • Missing data
  • Saving output
  • ggplot (time allowing)
This Lesson Covers
  • Review: Starting a New Project in R, loading the tidyverse and importing data
  • Filtering
  • Relational and Assignment Operators
  • Reordering Data (arrange)
  • Selecting Data (select)
  • Renaming Columns
  • Adding New Variables
  • Summarizing Data
  • Piping
This Lesson Covers
  • What is Exploratory Data Analysis?
  • What do we have? – dim, str, and summary
  • Frequency – Univariate EDA
  • Covariation – Two or more variables
  • Categorical vs Categorical Variables
  • Categorical vs Continuous Variables
This Lesson Covers
  • Getting Started With Strings
  • Combining and Subsetting Strings
  • Regular Expressions
  • Creating Factors
  • Altering Factors
This Lesson Covers
  • Merging / Joining Dataframes
  • Reshaping with tidyr
This Lesson Covers
  • R Markdown
  • Markdown Syntax
  • Creating Reproducible Reports
This Lesson Covers
  • When you should write a function
  • Steps to writing a function
  • Naming conventions
  • Arguments
  • Returns
  • Conditionals
  • Environment
Go to Week 9 Lesson

Required Data Files
None

Optional Reading
R for Data Science Chapter 21

This Lesson Covers
  • Getting started with loops
  • Output
  • While loops
  • Loops with conditionals and functions
  • Error handling
Go to Week 10 Lesson

Required Data Files
None

Optional Reading
R for Data Science Chapters 22-25

This Lesson Covers
  • Terminology
  • Simple Linear Models with Plots
  • Multiple Regression – Formula notation in R
  • Modeling
  • Simulations
  • Reproducible simulations

Extras

Go to Extra

Required Data Files
Ramen Ratings

Optional Reading
None

This Lesson Covers
Have you ever wanted to change your ggplots with the click of a button? Wouldn’t it be nice to use a drop-down menu to filter your data? R Shiny allows you and others to interact with your code through a graphic web interface.
Go to Extra

Required Data Files
None

Optional Reading
None

This Lesson Covers
This extra shows you an easy way to split up your loops over multiple cores on your computer to run in “parallel” and speed up large or long-running loops.
Go to Extra

Required Data Files
None

Optional Reading
None

This Lesson Covers
This extra demonstrates two useful tools for handling missing data in statistical models.
Go to Extra

Required Data Files
None

Optional Reading
None

This Lesson Covers
The caret package provides a consistent framework for fitting hundreds of different types of predictive models, then comparing them to select the most effective models using out of sample accuracy.
Go to Extra

Required Data Files
None

Optional Reading
None

This Lesson Covers
The stargazer package makes it easy to create publication quality regression tables in html or LateX.
Go to Extra

Required Data Files
None

Optional Reading
None

This Lesson Covers
The ggally package provides a function for creating scatterplot matrices. A scatterplot matrix arranges multiple scatterplots on a grid so that they are easy to compare to one another.