diff --git a/DESCRIPTION b/DESCRIPTION index ae683ab..6302fca 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: spatialgridr Title: Grid spatial data -Version: 0.0.2.2 +Version: 0.0.2.3 Authors@R: person(given = "Jason", family = "Flower", email = "jflower@ucsb.edu", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-6731-8182")) Description: An R package that allows easy gridding of spatial data. License: GPL (>= 3) + file LICENSE @@ -12,22 +12,22 @@ Imports: checkmate, dplyr, exactextractr, + magrittr, + mregions2, methods, remotes, rlang, + rnaturalearth, + rnaturalearthhires (>= 1.0.0.9000), sf, stats, terra, utils Suggests: codetools, - mregions2 (>= 1.0.0), - rnaturalearth, - rnaturalearthhires (>= 1.0.0.9000), testthat (>= 3.0.0) URL: https://emlab-ucsb.github.io/spatialgridr/ Config/testthat/edition: 3 Remotes: - github::lifewatch/mregions2, github::ropensci/rnaturalearthhires Config/roxygen2/version: 8.0.0 diff --git a/R/get_boundary.R b/R/get_boundary.R index 1653b35..73efcc7 100644 --- a/R/get_boundary.R +++ b/R/get_boundary.R @@ -87,7 +87,6 @@ get_boundary <- function(name = "Australia", type = "eez", country_type = "count checkmate::assert_choice(country_type, c(country_types, "ocean", "high_seas", "seas_oceans")) if(type %in% mregions_types){ - rlang::check_installed("mregions2", reason = "to use `get_boundary()` to access marine boundaries", action = \(pkg, ...) remotes::install_github("lifewatch/mregions2")) query_type <- mregions_types_lookup[which(mregions_types == type)] if(type == "high_seas") return(mregions2::mrp_get("high_seas")) @@ -108,9 +107,6 @@ get_boundary <- function(name = "Australia", type = "eez", country_type = "count eval(parse(text = paste0("mregions2::mrp_get(\"", query_type, "\", cql_filter = \"", mregions_country_type, " = '", name, "'\")"))) } else{ - rlang::check_installed("rnaturalearth", reason = "to use `get_boundary()` to access land boundaries", action = \(pkg, ...) remotes::install_github("ropensci/rnaturalearth")) - rlang::check_installed("rnaturalearthhires", reason = "to use `get_boundary()` to access high resolution land boundaries", action = \(pkg, ...) remotes::install_github("ropensci/rnaturalearthhires")) - if(is.null(name)) { message("You have requested all ", type, " boundaries.") if(type == "country") return(rnaturalearth::ne_countries(scale = 10, returnclass = "sf")) else{