I wrote a small article about purrr packge before.
Now I think it’s time to write a better article introducing the purrr package.
You can find the official website through this link.
The map family is used to apply function or functions over a list or vector.
The “primary” function is the map function.
library(purrr) #Remember: map always return a list rather than a vector test_list <- list(a=c(1,2,3), b=c(2,3,4), c=c(3,4,5)) map(test_list,mean) #> $a #>  2 #> #> $b #>  3 #> #> $c #>  4