Week 7: Strings, Factors & Dates
Oct 21, 2026 ยท 2:00โ4:40 PM ยท Bobst LL138
Before class
- Read: R02Pro Ch 10, Ch 3.6, Ch 3.11
- Review the newly released weekly exercise and prepare questions.
- Complete Weekly Exercise 6 (due tonight at 11:59 PM).
- ๐ Quiz 3 (20 min, covers Weeks 5โ6) will be held during the last 30 minutes of class.
- ๐ Proofreading corner: spot a typo or unclear passage in Ch 10, 3.6, or 3.11? Submit a PR or issue for extra credit (see syllabus).
Topics
- String manipulation with stringr: str_detect(), str_extract(), str_replace()
- Regular expressions: character classes, anchors, and quantifiers
- Categorical data with forcats: fct_reorder(), fct_lump(), factor level releveling
- Working with dates and times via lubridate: ymd(), dmy(), intervals, durations
Materials
- ๐ Lecture Slides: Interactive Presentation (HTML)
- ๐ In-Class Exercise: View Worksheet (HTML) ยท Download Starter Code (
.qmd) ยท or runget_worksheet(7)in your in-class repo - ๐ป Weekly Exercise 7: Accept Assignment on Classroom 50 ยท How to do it, start to finish
Due
- Weekly Exercise 6 (due tonight at 11:59 PM)
- In-class exercise 7 (pushed to GitHub by end of class)
- Quiz 3 (20 min, covers Weeks 5โ6)