Skip to content

Instantly share code, notes, and snippets.

@aammd
Created June 8, 2016 15:25
Show Gist options
  • Save aammd/467ff6a7acd23a6fd29449850921c571 to your computer and use it in GitHub Desktop.
Save aammd/467ff6a7acd23a6fd29449850921c571 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