Week 4: dplyr: rows, columns, and groups
Lectures
Labs
- Lab 4: dplyr, Part 1(PDF)
- Lab 4 solutions (password)
- Dplyr Practice: 10 Exercises with Solutions(.qmd)
Additional readings
- dplyr cheat sheet (Posit)
- 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?