07. Iterating on Data and Models

Published

Thursday, October 8, 2026

This week …

Repeatedly doing things to data and repeatedly doing things to models using functional programming patterns.

Reading

  • Hadley Wickham, Garrett Grolemund, and Mine Çetinkaya-Rundel R for Data Science: Import, Tidy, Transform, Visualize, and Model Data, 2nd ed. (Sebastopol, CA: O’Reilly Media, 2023), https://r4ds.hadley.nz.

Read the text online. Read Chapter 25 on functions and Chapter 26 on iteration.

There’s also reading attached to the assignment.

Examples

This week’s examples.

Assignment

This week’s assignment doesn’t involve any iteration or function-writing, but is some preparation for it.

Slides

Iterating on data and models

View HTML slides in a new window Download a PDF of these slides

Iterating safely

View HTML slides in a new window Download a PDF of these slides