We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fine_separate() and vice-versa.
fine_separate()
The text was updated successfully, but these errors were encountered:
idea
library(magrittr) m <- c("493214294", "493214392", "493215203", "493215301") coarse_gather <- function(meshcodes, distinct = FALSE) { res <- meshcodes %>% purrr::map_chr( function(x) { dplyr::case_when( jpmesh:::mesh_size(x) == units::set_units(0.5, "km") ~ substr(x, 1, 8), jpmesh:::mesh_size(x) == units::set_units(1, "km") ~ substr(x, 1, 6), jpmesh:::mesh_size(x) == units::set_units(10, "km") ~ substr(x, 1, 4) ) } ) if (rlang::is_true(distinct)) { res <- unique(res) } return(res) } coarse_gather(m) #> [1] "49321429" "49321439" "49321520" "49321530" coarse_gather(m) %>% coarse_gather() #> [1] "493214" "493214" "493215" "493215" coarse_gather(m) %>% coarse_gather(distinct = TRUE) #> [1] "493214" "493215"
Created on 2018-05-29 by the reprex package (v0.2.0).
Sorry, something went wrong.
566a89f
No branches or pull requests
fine_separate()
and vice-versa.The text was updated successfully, but these errors were encountered: