Module 04 Summary
What this module established
Tidy data means every variable is a column and every observation is a row. When a column name is a value — a month, a year, a category — the table is untidy, and every verb you want to use will fight you.
Carry forward
group_by()withsummarise()is the pair that changes the grain. Print the row count either side, and drop the grouping when done.case_when()takes the first TRUE, so order is meaning. Test missingness first and always supply.default.- A join is the only common verb that can make a table bigger. Check the key with
anyDuplicated()and compare row counts every time.
Before moving on
Move on when you can explain why a reversed pair of case_when() conditions produces a plausible, wrong column with no warning.
