Skip to content

Instantly share code, notes, and snippets.

@yutannihilation
Last active October 20, 2017 04:34
Show Gist options
  • Save yutannihilation/64655a7e5635f3933b90e1101626bb0d to your computer and use it in GitHub Desktop.
Save yutannihilation/64655a7e5635f3933b90e1101626bb0d to your computer and use it in GitHub Desktop.
# w/ purrrlyr
df.jp.prefs.hex %>%
purrrlyr::slice_rows("id") %>%
purrrlyr::by_slice(make_hex) %>% magrittr::use_series(.out) %>%
sf::st_sfc()
# w/ purrr
df.jp.prefs.hex %>%
split(.$id) %>%
purrr::map(make_hex) %>%
sf::st_sfc()
# w/ dplyr
df.jp.prefs.hex %>%
group_by(id) %>%
do(.out = make_hex(.)) %>%
magrittr::use_series(.out) %>%
sf::st_sfc()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment