04. Using dplyr to work with tables
This week …
We’ll learn about the core of working with data: doing things to rectangular tables.
Required Reading
- Hadley Wickham, Garrett Grolemund, and Mine Çetinkaya-Rundel R for Data Science: Import, Tidy, Transform, Visualize, and Model Data, 2nd ed. (Sebastopol, CA: O’Reilly Media, 2023), https://r4ds.hadley.nz.
Read the text online. Review or redo Chapter 3 and Chapter 5; read and work through as much of Chapters 12-14 as you can.
Kieran Healy Data Visualization: A Practical Introduction, Second edition. (Princeton: Princeton University Press, 2027), http://socviz.co/. Review Chapter 4 and read the first main section of Chapter 5, Use Pipes to Summarize Data.
Next, read the vignettes that come with
dplyr. (In R packages, a vignette is like and extended example or tutorial.) These are available on your computer because you’ve installed the package. But you can also read them online. Note that tidyverse vignettes do not use the base pipe,|>, they use the magrittr pipe,%>%instead. But for our purposes they are equivalent.
Read the following vignettes that come with dplyr, in the order listed:
Examples
Assignment
This week’s assignment. Give it a try after you’ve done the reading and worked through its examples.