Have you ever needed a function to be applied to multiple elements, such as datasets? Perhaps you want to run the same regression on different subsets of data. Or maybe you want to compare how different models perform against each other. Instead of copy and pasting your code repeatedly, map()
functions can do this for you! In this workshop, we will review the structure and uses of lists. Then, we will discuss how map functions work with lists and how these functions can be used to streamline your workflow.
The HTML slides provide an overview a four part overview for getting acquianted with map
functions:
- Atomic Vectors
- Lists
- Vectorized Operations (aka
map
Functions) - Practical Application
The slides include practice and solutions.
Included is also a simulated csv
file which allows you to follow along during the Practical Application
section.
The folder contains figures that are featured in the slides. I included the images for those who with to have a closer look at them, instead of just on the slide.