Brandon Hurr on using the map & walk functions in the purrr package
Brandon Hurr gave a great tutorial & presentation on using the purrr package, and specifically on using the two key function families map and walk functions. From Brandon:
Overview
map()andwalk()and their derivatives are functional programming tools that are part of thetidyverseset of packages, and in particular thepurrrpackage.
The presentation and tutorial cover the following:
- Data types in R
- Functions in R
- Iteration in R (for loops)
map()walk()
Slide Presentation:
Materials
- Source materials on Github
Important tips
-
In order for you to get the most out of this tutorial I have produced an R markdown document that will let you follow along with all of the functions and examples that I will present. This document uses functions that transverse the
tidyverseand therefore I would ask that if you plan to follow along on your computer that you install thetidyverse.”install.packages("tidyverse")