tests/testthat/helper_functions.R

skip_on_github_workflow <- function(x) {
  testthat::skip_if(
    identical(Sys.getenv("GITHUB_WORKFLOW"), x),
    paste("On", x))
}

standardize_geometry <- function(x) {
  x_crs <- sf::st_crs(x)
  sf::st_crs(x) <- sf::st_crs(NA)
  x <- sf::st_buffer(x, 0)
  sf::st_crs(x) <- x_crs
  x
}

Try the wdpar package in your browser

Any scripts or data that you put into this service are public.

wdpar documentation built on Sept. 21, 2023, 5:06 p.m.