Skip to content

Instantly share code, notes, and snippets.

@aammd
Created June 8, 2016 15:25
Show Gist options
  • Save aammd/5772c7144a68b0075611a98871db76df to your computer and use it in GitHub Desktop.
Save aammd/5772c7144a68b0075611a98871db76df to your computer and use it in GitHub Desktop.
experimenting with purr on gapminder
library(purrr)
library(gapminder)
gapminder %>%
transpose %>%
map(~ splice(., totalgdp = .$pop * .$gdpPercap)) %>%
transpose %>%
simplify_all() %>%
as.data.frame() %>%
head
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment