Housekeeping
Questions on Advanced Data Wrangling
Dates
Joins
Iteration
Next Week
Week 9: Advanced data viz
Week 10: Catch-up week
Week 11: Advanced data viz
Week 12: Advanced Quarto
Week 13: Wrap-up
You can get feedback through the end of December
Does using as.numeric() or parse_number() in R automatically change non-numeric characters into NA?
Mismatched variable types
Many-to-many joins
What happens to Mick after left_join(people, instruments, by = "name")?
people
| name | band |
|---|---|
| Mick | Stones |
| John | Beatles |
| Paul | Beatles |
instruments
| name | plays |
|---|---|
| John | guitar |
| Paul | bass |
| Keith | guitar |
Mick is dropped because he has no match in instruments.
Mick is kept, and his plays value is NA.
The code throws an error because the key values don’t fully match.
Mick is matched with Keith’s row because both play in a band.
What happens to Mick after left_join(people, instruments, by = "name")?
people
| name | band |
|---|---|
| Mick | Stones |
| John | Beatles |
| Paul | Beatles |
instruments
| name | plays |
|---|---|
| John | guitar |
| Paul | bass |
| Keith | guitar |
Mick is dropped because he has no match in instruments.
Mick is kept, and his plays value is NA.
The code throws an error because the key values don’t fully match.
Mick is matched with Keith’s row because both play in a band.