Running 'testthat.R' [56s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(chooseGCM)
  > 
  > test_check("chooseGCM")
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-closestdist_gcms-6.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-closestdist_gcms-12.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-closestdist_gcms-17.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-closestdist_gcms-23.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-closestdist_gcms-31.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-closestdist_gcms-38.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-closestdist_gcms-50.R
  Objects from s don't have the same number of cells. Filtering all available cells.
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-closestdist_gcms-60.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-compare_gcms-6.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-compare_gcms-11.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-compare_gcms-16.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-compare_gcms-21.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-compare_gcms-28.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-compare_gcms-35.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-compare_gcms-41.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-compare_gcms-48.R
  Objects from s don't have the same number of cells. Filtering all available cells.
  Objects from s don't have the same number of cells. Filtering all available cells.
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-cor_gcms-6.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-cor_gcms-11.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-cor_gcms-17.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-cor_gcms-28.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-cor_gcms-38.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-dist_gcms-6.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-dist_gcms-12.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-dist_gcms-18.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-dist_gcms-23.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-dist_gcms-31.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-dist_gcms-37.R
  CRS from s and study_area are not identical. Reprojecting study area.
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-env_gcms-6.R
  Saving _problems/test-env_gcms-11.R
  Saving _problems/test-env_gcms-16.R
  Saving _problems/test-env_gcms-34.R
  Saving _problems/test-env_gcms-39.R
  Saving _problems/test-env_gcms-51.R
  Saving _problems/test-env_gcms-56.R
  Saving _problems/test-env_gcms-62.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-flatten_gcms-48.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-hclust_gcms-6.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-hclust_gcms-13.R
  CRS from s and study_area are not identical. Reprojecting study area.
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-hclust_gcms-27.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-hclust_gcms-33.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-hclust_gcms-40.R
  Saving _problems/test-hclust_gcms-51.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-kmeans_gcms-6.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-kmeans_gcms-14.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-kmeans_gcms-19.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-kmeans_gcms-26.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-kmeans_gcms-33.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-kmeans_gcms-40.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-kmeans_gcms-47.R
  Saving _problems/test-montecarlo_gcms-6.R
  Saving _problems/test-montecarlo_gcms-16.R
  Saving _problems/test-montecarlo_gcms-22.R
  Saving _problems/test-montecarlo_gcms-28.R
  Saving _problems/test-montecarlo_gcms-33.R
  Saving _problems/test-montecarlo_gcms-40.R
  Saving _problems/test-montecarlo_gcms-45.R
  Saving _problems/test-montecarlo_gcms-50.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-optk_gcms-5.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-optk_gcms-14.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-summary-gcms-5.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-summary-gcms-13.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-summary-gcms-28.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-transform_gcms-134.R
  Saving _problems/test-transform_gcms-135.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-transform_gcms-150.R
  Saving _problems/test-transform_gcms-151.R
  CRS from s and study_area are not identical. Reprojecting study area.
  Saving _problems/test-transform_gcms-306.R
  Saving _problems/test-transform_gcms-307.R
  [ FAIL 68 | WARN 139 | SKIP 0 | PASS 96 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-closestdist_gcms.R:6:3'): Function returns a list with expected elements ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::closestdist_gcms(s, var_names, study_area) at test-closestdist_gcms.R:6:3
   2.   └─chooseGCM::dist_gcms(...)
   3.     └─chooseGCM::transform_gcms(s, var_names, study_area)
   4.       ├─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra::project(study_area, terra::crs(s[[1]]))
   6.         └─terra (local) .local(x, ...)
   7.           └─terra:::messages(x, "project")
   8.             └─terra:::error(f, x@pntr$getError())
  ── Error ('test-closestdist_gcms.R:12:3'): Returned suggested GCMs are non-empty ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::closestdist_gcms(s, var_names, study_area) at test-closestdist_gcms.R:12:3
   2.   └─chooseGCM::dist_gcms(...)
   3.     └─chooseGCM::transform_gcms(s, var_names, study_area)
   4.       ├─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra::project(study_area, terra::crs(s[[1]]))
   6.         └─terra (local) .local(x, ...)
   7.           └─terra:::messages(x, "project")
   8.             └─terra:::error(f, x@pntr$getError())
  ── Error ('test-closestdist_gcms.R:17:3'): Global mean distance is a positive numeric value ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::closestdist_gcms(s, var_names, study_area) at test-closestdist_gcms.R:17:3
   2.   └─chooseGCM::dist_gcms(...)
   3.     └─chooseGCM::transform_gcms(s, var_names, study_area)
   4.       ├─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra::project(study_area, terra::crs(s[[1]]))
   6.         └─terra (local) .local(x, ...)
   7.           └─terra:::messages(x, "project")
   8.             └─terra:::error(f, x@pntr$getError())
  ── Error ('test-closestdist_gcms.R:23:3'): Best mean difference is non-negative ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::closestdist_gcms(s, var_names, study_area) at test-closestdist_gcms.R:23:3
   2.   └─chooseGCM::dist_gcms(...)
   3.     └─chooseGCM::transform_gcms(s, var_names, study_area)
   4.       ├─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra::project(study_area, terra::crs(s[[1]]))
   6.         └─terra (local) .local(x, ...)
   7.           └─terra:::messages(x, "project")
   8.             └─terra:::error(f, x@pntr$getError())
  ── Error ('test-closestdist_gcms.R:31:5'): Function handles different distance methods ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::closestdist_gcms(s, var_names, study_area, method = method) at test-closestdist_gcms.R:31:5
   2.   └─chooseGCM::dist_gcms(...)
   3.     └─chooseGCM::transform_gcms(s, var_names, study_area)
   4.       ├─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra::project(study_area, terra::crs(s[[1]]))
   6.         └─terra (local) .local(x, ...)
   7.           └─terra:::messages(x, "project")
   8.             └─terra:::error(f, x@pntr$getError())
  ── Error ('test-closestdist_gcms.R:38:5'): Function handles different values of k ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::closestdist_gcms(s, var_names, study_area, k = k) at test-closestdist_gcms.R:38:5
   2.   └─chooseGCM::dist_gcms(...)
   3.     └─chooseGCM::transform_gcms(s, var_names, study_area)
   4.       ├─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra::project(study_area, terra::crs(s[[1]]))
   6.         └─terra (local) .local(x, ...)
   7.           └─terra:::messages(x, "project")
   8.             └─terra:::error(f, x@pntr$getError())
  ── Error ('test-closestdist_gcms.R:50:3'): Function stops when max_difference is exceeded ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::closestdist_gcms(s, var_names, study_area, max_difference = 0.1) at test-closestdist_gcms.R:50:3
   2.   └─chooseGCM::dist_gcms(...)
   3.     └─chooseGCM::transform_gcms(s, var_names, study_area)
   4.       ├─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra::project(study_area, terra::crs(s[[1]]))
   6.         └─terra (local) .local(x, ...)
   7.           └─terra:::messages(x, "project")
   8.             └─terra:::error(f, x@pntr$getError())
  ── Error ('test-closestdist_gcms.R:60:3'): Function returns different results for different variable selections ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::closestdist_gcms(s, c("bio_1"), study_area) at test-closestdist_gcms.R:60:3
   2.   └─chooseGCM::dist_gcms(...)
   3.     └─chooseGCM::transform_gcms(s, var_names, study_area)
   4.       ├─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra::project(study_area, terra::crs(s[[1]]))
   6.         └─terra (local) .local(x, ...)
   7.           └─terra:::messages(x, "project")
   8.             └─terra:::error(f, x@pntr$getError())
  ── Error ('test-compare_gcms.R:6:3'): compare_gcms returns a list ──────────────
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-compare_gcms.R:6:3
   2. │ └─base::withCallingHandlers(...)
   3. └─chooseGCM::compare_gcms(s, var_names, study_area, k = 3)
   4.   └─chooseGCM::transform_gcms(s, var_names, study_area = study_area)
   5.     ├─terra::project(study_area, terra::crs(s[[1]]))
   6.     └─terra::project(study_area, terra::crs(s[[1]]))
   7.       └─terra (local) .local(x, ...)
   8.         └─terra:::messages(x, "project")
   9.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-compare_gcms.R:11:3'): compare_gcms output contains expected elements ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::compare_gcms(s, var_names, study_area, k = 3) at test-compare_gcms.R:11:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area = study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-compare_gcms.R:16:3'): suggested_gcms is a list ────────────────
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::compare_gcms(s, var_names, study_area, k = 3) at test-compare_gcms.R:16:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area = study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-compare_gcms.R:21:3'): statistics_gcms is a ggplot object ──────
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::compare_gcms(s, var_names, study_area, k = 3) at test-compare_gcms.R:21:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area = study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-compare_gcms.R:28:5'): compare_gcms works with different clustering methods ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::compare_gcms(s, var_names, study_area, k = 3, clustering_method = method) at test-compare_gcms.R:28:5
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area = study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-compare_gcms.R:35:5'): compare_gcms handles different k values ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::compare_gcms(s, var_names, study_area, k = k) at test-compare_gcms.R:35:5
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area = study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-compare_gcms.R:41:3'): compare_gcms works with scaling enabled and disabled ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::compare_gcms(s, var_names, study_area, scale = TRUE) at test-compare_gcms.R:41:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area = study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-compare_gcms.R:48:3'): compare_gcms accepts 'all' as var_names ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::compare_gcms(s, "all", study_area, k = 3) at test-compare_gcms.R:48:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area = study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-cor_gcms.R:6:3'): cor_gcms returns expected structure ──────────
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::cor_gcms(s, var_names, study_area) at test-cor_gcms.R:6:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-cor_gcms.R:11:3'): cor_gcms correlation matrix has correct dimensions ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::cor_gcms(s, var_names, study_area) at test-cor_gcms.R:11:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-cor_gcms.R:17:5'): cor_gcms supports valid correlation methods ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. ├─checkmate::expect_class(...) at test-cor_gcms.R:17:5
   2. │ └─checkmate::checkClass(x, classes, ordered, null.ok)
   3. └─chooseGCM::cor_gcms(s, var_names, study_area, method = m)
   4.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   5.     ├─terra::project(study_area, terra::crs(s[[1]]))
   6.     └─terra::project(study_area, terra::crs(s[[1]]))
   7.       └─terra (local) .local(x, ...)
   8.         └─terra:::messages(x, "project")
   9.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-cor_gcms.R:28:3'): cor_gcms handles missing values gracefully ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::cor_gcms(s_missing, var_names, study_area) at test-cor_gcms.R:28:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-cor_gcms.R:38:3'): cor_gcms produces a valid ggplot object ─────
  Error: [project] input crs is not valid
  Backtrace:
       ▆
    1. ├─testthat::expect_s3_class(...) at test-cor_gcms.R:38:3
    2. │ └─testthat::quasi_label(enquo(object))
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─chooseGCM::cor_gcms(s, var_names, study_area)
    5.   └─chooseGCM::transform_gcms(s, var_names, study_area)
    6.     ├─terra::project(study_area, terra::crs(s[[1]]))
    7.     └─terra::project(study_area, terra::crs(s[[1]]))
    8.       └─terra (local) .local(x, ...)
    9.         └─terra:::messages(x, "project")
   10.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-dist_gcms.R:6:3'): dist_gcms returns a list with distances and heatmap ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::dist_gcms(s, var_names, study_area) at test-dist_gcms.R:6:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-dist_gcms.R:12:3'): dist_gcms calculates distances correctly ───
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::dist_gcms(s, var_names, study_area, method = "euclidean") at test-dist_gcms.R:12:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-dist_gcms.R:18:3'): dist_gcms returns a ggplot object for heatmap ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::dist_gcms(s, var_names, study_area) at test-dist_gcms.R:18:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-dist_gcms.R:23:3'): dist_gcms handles scaling correctly ────────
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::dist_gcms(s, var_names, study_area, scale = TRUE) at test-dist_gcms.R:23:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-dist_gcms.R:31:5'): dist_gcms handles different distance methods ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::dist_gcms(s, var_names, study_area, method = method) at test-dist_gcms.R:31:5
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-dist_gcms.R:37:3'): dist_gcms handles 'all' in var_names ───────
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::dist_gcms(s, "all", study_area) at test-dist_gcms.R:37:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-env_gcms.R:6:3'): env_gcms returns a ggplot object when no highlight is specified ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::env_gcms(s, var_names, study_area) at test-env_gcms.R:6:3
   2.   ├─terra::project(study_area, terra::crs(s[[1]]))
   3.   └─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra (local) .local(x, ...)
   5.       └─terra:::messages(x, "project")
   6.         └─terra:::error(f, x@pntr$getError())
  ── Error ('test-env_gcms.R:11:3'): env_gcms returns a ggplot object when specific GCMs are highlighted ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::env_gcms(...) at test-env_gcms.R:11:3
   2.   ├─terra::project(study_area, terra::crs(s[[1]]))
   3.   └─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra (local) .local(x, ...)
   5.       └─terra:::messages(x, "project")
   6.         └─terra:::error(f, x@pntr$getError())
  ── Error ('test-env_gcms.R:16:3'): env_gcms returns a ggplot object when 'sum' is highlighted ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::env_gcms(s, var_names, study_area, highlight = "sum") at test-env_gcms.R:16:3
   2.   ├─terra::project(study_area, terra::crs(s[[1]]))
   3.   └─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra (local) .local(x, ...)
   5.       └─terra:::messages(x, "project")
   6.         └─terra:::error(f, x@pntr$getError())
  ── Error ('test-env_gcms.R:34:3'): env_gcms handles different resolutions ──────
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::env_gcms(s, var_names, study_area, resolution = 50) at test-env_gcms.R:34:3
   2.   ├─terra::project(study_area, terra::crs(s[[1]]))
   3.   └─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra (local) .local(x, ...)
   5.       └─terra:::messages(x, "project")
   6.         └─terra:::error(f, x@pntr$getError())
  ── Error ('test-env_gcms.R:39:3'): env_gcms handles custom titles ──────────────
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::env_gcms(s, var_names, study_area, title = "Custom Title") at test-env_gcms.R:39:3
   2.   ├─terra::project(study_area, terra::crs(s[[1]]))
   3.   └─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra (local) .local(x, ...)
   5.       └─terra:::messages(x, "project")
   6.         └─terra:::error(f, x@pntr$getError())
  ── Error ('test-env_gcms.R:51:3'): env_gcms handles a single GCM ───────────────
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::env_gcms(single_gcm, var_names, study_area) at test-env_gcms.R:51:3
   2.   ├─terra::project(study_area, terra::crs(s[[1]]))
   3.   └─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra (local) .local(x, ...)
   5.       └─terra:::messages(x, "project")
   6.         └─terra:::error(f, x@pntr$getError())
  ── Error ('test-env_gcms.R:56:3'): env_gcms handles a study area with a different CRS ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. ├─terra::project(...) at test-env_gcms.R:56:3
   2. └─terra::project(...)
   3.   └─terra (local) .local(x, ...)
   4.     └─terra:::messages(x, "project")
   5.       └─terra:::error(f, x@pntr$getError())
  ── Error ('test-env_gcms.R:62:3'): env_gcms handles a large resolution value ───
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::env_gcms(s, var_names, study_area, resolution = 100) at test-env_gcms.R:62:3
   2.   ├─terra::project(study_area, terra::crs(s[[1]]))
   3.   └─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra (local) .local(x, ...)
   5.       └─terra:::messages(x, "project")
   6.         └─terra:::error(f, x@pntr$getError())
  ── Error ('test-flatten_gcms.R:48:3'): flatten_gcms works correctly with real data ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::transform_gcms(s, var_names, study_area) at test-flatten_gcms.R:48:3
   2.   ├─terra::project(study_area, terra::crs(s[[1]]))
   3.   └─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra (local) .local(x, ...)
   5.       └─terra:::messages(x, "project")
   6.         └─terra:::error(f, x@pntr$getError())
  ── Error ('test-hclust_gcms.R:6:3'): hclust_gcms returns a list with expected elements ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::hclust_gcms(s, var_names, study_area, k = 3, n = 500) at test-hclust_gcms.R:6:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-hclust_gcms.R:13:3'): hclust_gcms handles different k values ───
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::hclust_gcms(s, var_names, study_area, k = 2, n = 500) at test-hclust_gcms.R:13:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-hclust_gcms.R:27:3'): hclust_gcms works correctly when n is NULL ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::hclust_gcms(s, var_names, study_area, k = 3, n = NULL) at test-hclust_gcms.R:27:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-hclust_gcms.R:33:3'): hclust_gcms preserves suggested GCM names ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::hclust_gcms(s, var_names, study_area, k = 3, n = 500) at test-hclust_gcms.R:33:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-hclust_gcms.R:39:3'): hclust_gcms returns an error if k is greater than available GCMs ──
  Error: [project] input crs is not valid
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-hclust_gcms.R:39:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. └─chooseGCM::hclust_gcms(s, var_names, study_area, k = 100, n = 500)
    8.   └─chooseGCM::transform_gcms(s, var_names, study_area)
    9.     ├─terra::project(study_area, terra::crs(s[[1]]))
   10.     └─terra::project(study_area, terra::crs(s[[1]]))
   11.       └─terra (local) .local(x, ...)
   12.         └─terra:::messages(x, "project")
   13.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-hclust_gcms.R:51:3'): hclust_gcms handles incorrect CRS in study_area ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. ├─terra::project(...) at test-hclust_gcms.R:51:3
   2. └─terra::project(...)
   3.   └─terra (local) .local(x, ...)
   4.     └─terra:::messages(x, "project")
   5.       └─terra:::error(f, x@pntr$getError())
  ── Error ('test-kmeans_gcms.R:6:3'): kmeans_gcms returns a list with expected elements ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::kmeans_gcms(s, var_names, study_area, k = 3) at test-kmeans_gcms.R:6:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-kmeans_gcms.R:14:3'): kmeans_gcms returns exactly k suggested models ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::kmeans_gcms(s, var_names, study_area, k = k) at test-kmeans_gcms.R:14:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-kmeans_gcms.R:19:5'): kmeans_gcms works with euclidean distance method ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::kmeans_gcms(s, var_names, study_area, k = 3, method = "euclidean") at test-kmeans_gcms.R:19:5
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-kmeans_gcms.R:26:5'): kmeans_gcms works with maximum distance method ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::kmeans_gcms(s, var_names, study_area, k = 3, method = "maximum") at test-kmeans_gcms.R:26:5
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-kmeans_gcms.R:33:5'): kmeans_gcms works with manhattan distance method ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::kmeans_gcms(s, var_names, study_area, k = 3, method = "manhattan") at test-kmeans_gcms.R:33:5
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-kmeans_gcms.R:40:5'): kmeans_gcms works with canberra distance method ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::kmeans_gcms(s, var_names, study_area, k = 3, method = "canberra") at test-kmeans_gcms.R:40:5
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-kmeans_gcms.R:47:5'): kmeans_gcms works with minkowski distance method ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::kmeans_gcms(s, var_names, study_area, k = 3, method = "minkowski") at test-kmeans_gcms.R:47:5
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-montecarlo_gcms.R:6:3'): montecarlo_gcms runs with default arguments ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::montecarlo_gcms(s, var_names, study_area) at test-montecarlo_gcms.R:6:3
   2.   ├─terra::project(study_area, terra::crs(s[[1]]))
   3.   └─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra (local) .local(x, ...)
   5.       └─terra:::messages(x, "project")
   6.         └─terra:::error(f, x@pntr$getError())
  ── Error ('test-montecarlo_gcms.R:16:3'): montecarlo_gcms returns a ggplot object ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::montecarlo_gcms(s, var_names, study_area) at test-montecarlo_gcms.R:16:3
   2.   ├─terra::project(study_area, terra::crs(s[[1]]))
   3.   └─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra (local) .local(x, ...)
   5.       └─terra:::messages(x, "project")
   6.         └─terra:::error(f, x@pntr$getError())
  ── Error ('test-montecarlo_gcms.R:22:3'): Non-null study_area is handled correctly ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::montecarlo_gcms(s, var_names, study_area_test) at test-montecarlo_gcms.R:22:3
   2.   ├─terra::project(study_area, terra::crs(s[[1]]))
   3.   └─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra (local) .local(x, ...)
   5.       └─terra:::messages(x, "project")
   6.         └─terra:::error(f, x@pntr$getError())
  ── Error ('test-montecarlo_gcms.R:28:3'): Scaling data works when scale = TRUE ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::montecarlo_gcms(s, var_names, study_area, scale = TRUE) at test-montecarlo_gcms.R:28:3
   2.   ├─terra::project(study_area, terra::crs(s[[1]]))
   3.   └─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra (local) .local(x, ...)
   5.       └─terra:::messages(x, "project")
   6.         └─terra:::error(f, x@pntr$getError())
  ── Error ('test-montecarlo_gcms.R:33:3'): Different permutation values work ────
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::montecarlo_gcms(s, var_names, study_area, perm = 1000) at test-montecarlo_gcms.R:33:3
   2.   ├─terra::project(study_area, terra::crs(s[[1]]))
   3.   └─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra (local) .local(x, ...)
   5.       └─terra:::messages(x, "project")
   6.         └─terra:::error(f, x@pntr$getError())
  ── Error ('test-montecarlo_gcms.R:40:3'): Clustering with kmeans method works ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::montecarlo_gcms(s, var_names, study_area, clustering_method = "kmeans") at test-montecarlo_gcms.R:40:3
   2.   ├─terra::project(study_area, terra::crs(s[[1]]))
   3.   └─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra (local) .local(x, ...)
   5.       └─terra:::messages(x, "project")
   6.         └─terra:::error(f, x@pntr$getError())
  ── Error ('test-montecarlo_gcms.R:45:3'): Clustering with hclust method works ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::montecarlo_gcms(s, var_names, study_area, clustering_method = "hclust") at test-montecarlo_gcms.R:45:3
   2.   ├─terra::project(study_area, terra::crs(s[[1]]))
   3.   └─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra (local) .local(x, ...)
   5.       └─terra:::messages(x, "project")
   6.         └─terra:::error(f, x@pntr$getError())
  ── Error ('test-montecarlo_gcms.R:50:3'): Clustering with closestdist method works ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::montecarlo_gcms(s, var_names, study_area, clustering_method = "closestdist") at test-montecarlo_gcms.R:50:3
   2.   ├─terra::project(study_area, terra::crs(s[[1]]))
   3.   └─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra (local) .local(x, ...)
   5.       └─terra:::messages(x, "project")
   6.         └─terra:::error(f, x@pntr$getError())
  ── Error ('test-optk_gcms.R:5:3'): optk_gcms works with kmeans and wss method ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::optk_gcms(...) at test-optk_gcms.R:5:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-optk_gcms.R:14:3'): optk_gcms works with kmeans and silhouette method ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::optk_gcms(...) at test-optk_gcms.R:14:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-summary-gcms.R:5:3'): summary_gcms returns a list ──────────────
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::summary_gcms(s, var_names, study_area) at test-summary-gcms.R:5:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-summary-gcms.R:13:3'): summary_gcms contains expected statistics ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::summary_gcms(s, var_names, study_area) at test-summary-gcms.R:13:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-summary-gcms.R:28:3'): summary_gcms accepts 'all' as argument for var_names ──
  Error: [project] input crs is not valid
  Backtrace:
      ▆
   1. └─chooseGCM::summary_gcms(s, "all", study_area) at test-summary-gcms.R:28:3
   2.   └─chooseGCM::transform_gcms(s, var_names, study_area)
   3.     ├─terra::project(study_area, terra::crs(s[[1]]))
   4.     └─terra::project(study_area, terra::crs(s[[1]]))
   5.       └─terra (local) .local(x, ...)
   6.         └─terra:::messages(x, "project")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Failure ('test-transform_gcms.R:134:3'): study_area as projected sf ─────────
  Expected `result <- transform_gcms(s, var_names = var_names, study_area)` not to throw any errors.
  Actually got a <simpleError> with message:
    [project] Cannot do this transformation
  ── Error ('test-transform_gcms.R:135:3'): study_area as projected sf ───────────
  Error in `eval(code, test_env)`: object 'result' not found
  Backtrace:
      ▆
   1. └─testthat::expect_true(length(result) == 3) at test-transform_gcms.R:135:3
   2.   └─testthat::quasi_label(enquo(object), label)
   3.     └─rlang::eval_bare(expr, quo_get_env(quo))
  ── Failure ('test-transform_gcms.R:150:3'): study_area as projected sf (different projection) ──
  Expected `result <- transform_gcms(s, var_names = var_names, study_area)` not to throw any errors.
  Actually got a <simpleError> with message:
    [project] Cannot do this transformation
  ── Error ('test-transform_gcms.R:151:3'): study_area as projected sf (different projection) ──
  Error in `eval(code, test_env)`: object 'result' not found
  Backtrace:
      ▆
   1. └─testthat::expect_true(length(result) == 3) at test-transform_gcms.R:151:3
   2.   └─testthat::quasi_label(enquo(object), label)
   3.     └─rlang::eval_bare(expr, quo_get_env(quo))
  ── Failure ('test-transform_gcms.R:306:3'): transform_gcms works correctly with real data ──
  Expected `s_trans <- transform_gcms(s, var_names, study_area)` not to throw any errors.
  Actually got a <simpleError> with message:
    [project] input crs is not valid
  ── Error ('test-transform_gcms.R:307:3'): transform_gcms works correctly with real data ──
  Error in `eval(code, test_env)`: object 's_trans' not found
  Backtrace:
      ▆
   1. └─testthat::expect_true(length(s_trans) == 11) at test-transform_gcms.R:307:3
   2.   └─testthat::quasi_label(enquo(object), label)
   3.     └─rlang::eval_bare(expr, quo_get_env(quo))
  
  [ FAIL 68 | WARN 139 | SKIP 0 | PASS 96 ]
  Error:
  ! Test failures.
  Execution halted