M4 - Data Wrangling
Learning Goals
- Describe the usefulness of data wrangling and its place in the data pipeline;
- Wrangle “real world” datasets with
dplyr
functions:Filter
,Arrange
,Select
,Mutate
-
Using “pipes” to tidy code
- Gathering & spreading data
pivot_longer
andpivot_wider
- Combining multiple datasets into one
- Merging data sets with
rbind
&cbind
- Joining data & join types
- Merging data sets with
- Split-apply-combine techniques with
group_by
andsummarize
- Saving wrangled datasets
Lesson Documents
Download these and import into the Lessons folder of your workspace:
Lab Documents
Assignment
Recordings
- Tidy data; "dplyr" wrangling functions; piping commands
- More "dplyr" wrangling functions; "lubridate"
- Transforming data
- Combining datasets; types of joins