Iterate using purrr
Chapters 3 & 4 of Writing Functions in R. Theste two chapters are focused on
purrr and it’s use in iteration, particulaly the
map() family. It may seem surprising that these tools for iteration are buried in the second half of a course on writing functions, but as you will see, these concepts are closely linked through a style known as functional programming, which is particularly relevant to much data science type analyses.