Benefit of using the map function in purrr

  • purrr::map() is equivalent to lapply()

  • returns a list and is the most general

  • the length of the input == the length of the output

  • map() is more flexible, with additional arguments allowed

  • map() has a host of extensions