Week 9: Strings and regular expressions
Lectures
Labs
- Lab 9: Strings and Regex(PDF)
- Lab 9 solutions (password)
Sample quiz
Additional readings
- R for Data Science: Strings
- R for Data Science: Regular expressions
- stringr documentation
- STAT 545: Character vectors
Discussion
- Why is
str_detect()often easier to use in a tidy pipeline thangrepl()? - In words, write a pattern that finds a DC ZIP code. What would that pattern miss?