Prepare
Due: March 7, 2025
prepare
Learning objectives
- Explain how R utilizes iteration naturally with vectorized operations
- Iterate across rows in a data frame using
across()
- Write anonymous functions for one-time tasks
- Define list objects
- Iterate across list elements using
map()
functions
Preparations
π Read
- R4DS: Chp 26 - Iteration
- (Optional) R4DS: Chp 27 - A field guide to base R
- We wonβt use most of these methods in class, but they can be helpful in case you find code examples in the wild that use them.