diff --git a/.Rbuildignore b/.Rbuildignore index 5cb30a8..1025e64 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,3 +1,5 @@ +^renv$ +^renv\.lock$ ^.*\.Rproj$ ^\.Rproj\.user$ ^LICENSE\.md$ diff --git a/DESCRIPTION b/DESCRIPTION index ddff400..5927447 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -35,10 +35,11 @@ Imports: tidyr, units Suggests: + bold (>= 1.3.0), knitr, rmarkdown, rnaturalearthdata, - taxize, + taxize (>= 0.9.99), testthat (>= 3.0.0) Config/testthat/edition: 3 Encoding: UTF-8 @@ -47,4 +48,6 @@ Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.1 VignetteBuilder: knitr, rmarkdown Remotes: - hrbrmstr/mgrs + github::hrbrmstr/mgrs, + github::ropensci/bold, + github::ropensci/taxize, diff --git a/R/check_cell_size.R b/R/check_cell_size.R index bb0d5fe..52e4ab7 100644 --- a/R/check_cell_size.R +++ b/R/check_cell_size.R @@ -13,8 +13,7 @@ check_cell_size <- function(cell_size, cell_size_units, resolution, level) { res_size <- as.numeric(stringr::str_extract(resolution, "[0-9]*(?=km)")) - if ((res_size < cell_size) | - as.integer(cell_size / res_size)==(cell_size / res_size)) { + if (res_size %% cell_size != 0) { stop("cell_size must be a whole number multiple of the resolution. For example, if resolution is 1 km, cell_size can be 1, 2, 3,.. 10,.. 100, etc.") @@ -33,8 +32,7 @@ check_cell_size <- function(cell_size, cell_size_units, resolution, level) { res_size <- as.numeric(stringr::str_extract(resolution, "[0-9,.]*(?=degrees)")) - if (!(res_size <= cell_size) | - !as.integer(cell_size / res_size)==(cell_size / res_size)) { + if (res_size %% cell_size != 0) { stop("cell_size must be a whole number multiple of the resolution. For example, if resolution is 0.25 degrees, cell_size can be 0.25, 0.5, 0.75, 1, etc.") diff --git a/man/b3gbi-package.Rd b/man/b3gbi-package.Rd index 4c917b6..27aceef 100644 --- a/man/b3gbi-package.Rd +++ b/man/b3gbi-package.Rd @@ -15,6 +15,7 @@ Useful links: \itemize{ \item \url{https://github.com/b-cubed-eu/b3gbi} \item \url{https://b-cubed-eu.github.io/b3gbi/} + \item Report bugs at \url{https://github.com/b-cubed-eu/b3gbi/issues} } }