Week 4: dplyr: rows, columns, and groups
Lectures
- 4.1 dplyr: Rows(PDF)
- 4.2 dplyr: Columns(PDF)
- 4.3 dplyr: Groups and Summaries(PDF)
- dplyr cheat sheet (Posit)
Labs
- Lab 4: dplyr, Part 1(PDF)
- Lab 4 solutions (password)
Practice
Sample quiz
Additional readings
- R for Data Science: Data transformation
- Tidyverse Style Guide: Syntax
- STAT 545: Introduction to dplyr
- STAT 545: Single-table dplyr functions
Discussion
- If a table has extra rows, extra columns, and the wrong order, which dplyr verb would you use first, and why?
- Why does
group_by()without a later summary or grouped mutate often surprise people?