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
}

is_on_cran <- function() {
  ("CheckExEnv" %in% search()) ||
  any(c("_R_CHECK_TIMINGS_", "_R_CHECK_LICENSE_") %in% names(Sys.getenv()))
}

Try the wdpar package in your browser

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

wdpar documentation built on Oct. 7, 2024, 9:07 a.m.