Week 14: Iteration, purrr, and wrap-up
Lectures
- 14.1 Vectors and Lists(PDF)
- 14.2 Iteration: Loops and purrr(PDF)
- 14.3 Course Wrap(PDF)
- purrr cheat sheet
Labs
Sample final exam
Additional readings
- R for Data Science: Iteration
- R for Data Science: A field guide to base R
- Jenny Bryan’s purrr tutorial
- What They Forgot to Teach You About R: Debugging R code
Discussion
- When is a
forloop clearer thanpurrr::map(), and when is it the other way around? - What does it mean for a vector to be atomic, and why does that matter when dates and numbers land in one column?