One of R’s most powerful features is that it’s a functional programming language. purrr is a consistent and efficient toolkit for programming with functions and working with lists. At its heart is
map() and friends: functions for the common pattern of iterating over a vector or list, doing something to each element, and then storing the results. These functions let you iterate efficiently and with less code. As Jenny Bryan once said, “of course someone needs to write
for loops; it doesn’t have to be you.