diff --git a/R/utils.R b/R/utils.R index 333f450..bc2f85c 100644 --- a/R/utils.R +++ b/R/utils.R @@ -503,7 +503,7 @@ var_to_terra <- function(var, dap) { nlyrs = dap$Tdim, extent = c( xmin = min(xmin, xmax), - xmax = max(xmax, xmax), + xmax = max(xmin, xmax), ymin = min(ymin, ymax), ymax = max(ymin, ymax) )) diff --git a/tests/testthat/test-climateR.R b/tests/testthat/test-climateR.R index 2715d3b..8248765 100644 --- a/tests/testthat/test-climateR.R +++ b/tests/testthat/test-climateR.R @@ -1,5 +1,5 @@ -library(AOI) -library(terra) +suppressWarnings({ library(AOI) }) +suppressWarnings({ library(terra) }) library(climateR) cities = geocode(c("Fort Collins, CO", diff --git a/tests/testthat/test-earthdata.R b/tests/testthat/test-earthdata.R index cd9e919..7f20b29 100644 --- a/tests/testthat/test-earthdata.R +++ b/tests/testthat/test-earthdata.R @@ -1,5 +1,5 @@ -library(AOI) -library(terra) +suppressWarnings({ library(AOI) }) +suppressWarnings({ library(terra) }) library(climateR) cities = geocode(c("Fort Collins, CO",