Week 5 — Functions, Iteration, Strings

June 15 – 19, 2026

Note

Friday June 19 is Juneteenth — no class. Quiz 4 will be rescheduled to Monday Jun 22.

We move beyond tidyverse verbs into more general programming territory: writing your own functions, iteration, and working with text and dates. Thursday is the first oral checkpoint during a project work session.

Daily plan

Date Topic Files
Mon Jun 15 Writing functions in R Slides · Page · day20-activity.R
Tue Jun 16 Iteration: working across many columns Slides · Page · day21-activity.R
Wed Jun 17 Iteration: map(), walk() & saving outputs Slides · Page · day22-activity.R
Thu Jun 18 Regular expressions (regex) + Project oral check-in #1 Slides · Page · day23-activity.R
Fri Jun 19 No class — Juneteenth —

Readings due this week

Note

Mon–Wed readings come from R for Data Science (R4DS) — Data Computing doesn’t cover functions and iteration in depth. R4DS is free at https://r4ds.hadley.nz.

  • Before Mon: R for Data Science Ch 25 — Functions
  • Before Tue: R for Data Science Ch 26 (§26.1–26.3) — Iteration basics
  • Before Wed: R for Data Science Ch 26 (§26.4–26.5) — purrr::map
  • Before Thu: Data Computing Ch 17 (§17.1–17.2) — regular expressions

Assignments due this week

  • Reading Quiz 4 — due before Monday’s class (Canvas)
  • HW 4 — due Mon Jun 15, 11:59 p.m.
  • Project Oral Check-in #1 — Thursday Jun 18 in class (signup on Canvas)