Running 'spelling.R' [0s]
  Running 'testthat.R' [95s]
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(tidysdm)
  Loading required package: tidymodels
  ── Attaching packages ────────────────────────────────────── tidymodels 1.4.1 ──
  ✔ broom        1.0.11     ✔ recipes      1.3.1 
  ✔ dials        1.4.2      ✔ rsample      1.3.1 
  ✔ dplyr        1.1.4      ✔ tailor       0.1.0 
  ✔ ggplot2      4.0.1      ✔ tidyr        1.3.2 
  ✔ infer        1.1.0      ✔ tune         2.0.1 
  ✔ modeldata    1.5.1      ✔ workflows    1.3.0 
  ✔ parsnip      1.4.0      ✔ workflowsets 1.1.1 
  ✔ purrr        1.2.0      ✔ yardstick    1.3.2 
  ── Conflicts ───────────────────────────────────────── tidymodels_conflicts() ──
  ✖ purrr::discard() masks scales::discard()
  ✖ dplyr::filter()  masks stats::filter()
  ✖ dplyr::lag()     masks stats::lag()
  ✖ recipes::step()  masks stats::step()
  Loading required package: spatialsample
  > 
  > test_check("tidysdm")
  Saving _problems/test_blockcv2rsample-49.R
  
  Attaching package: 'plotrix'
  
  The following object is masked from 'package:scales':
  
      rescale
  
  Saving _problems/test_clamp_predictors-9.R
  Saving _problems/test_clamp_predictors-73.R
  i Creating pre-processing data to finalize 1 unknown parameter: "mtry"
  Saving _problems/test_extrapol_mess-9.R
  Saving _problems/test_extrapol_mess-76.R
  Saving _problems/test_overlap_niche-7.R
  Saving _problems/test_predict_raster-6.R
  i Creating pre-processing data to finalize 1 unknown parameter: "mtry"
  Saving _problems/test_thin_by_cell-8.R
  Saving _problems/test_thin_by_cell_time-8.R
  [ FAIL 9 | WARN 12 | SKIP 1 | PASS 274 ]
  
  ══ Skipped tests (1) ═══════════════════════════════════════════════════════════
  • On CRAN (1): 'test_filter_collinear.R:2:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_blockcv2rsample.R:42:3'): blockcv2rsample conversion ───────────
  Error in `stats::kmeans(x_vals, centers = k, iter.max = 500, nstart = 25, ...)`: more cluster centers than distinct data points.
  Backtrace:
      ▆
   1. └─blockCV::cv_cluster(...) at test_blockcv2rsample.R:42:3
   2.   └─stats::kmeans(...)
  ── Error ('test_clamp_predictors.R:5:3'): clamping_predictor works on SpatRasters ──
  Error: [rast] empty srs
  Backtrace:
       ▆
    1. ├─terra::readRDS(...) at test_clamp_predictors.R:5:3
    2. └─terra::readRDS(...)
    3.   ├─terra::unwrap(x)
    4.   └─terra::unwrap(x)
    5.     └─terra (local) .local(x, ...)
    6.       ├─base::eval(parse(text = x@definition))
    7.       │ └─base::eval(parse(text = x@definition))
    8.       ├─terra::rast(...)
    9.       └─terra::rast(...)
   10.         └─terra (local) .local(x = x, ...)
   11.           └─terra:::new_rast(...)
   12.             └─terra:::messages(r, "rast")
   13.               └─terra:::error(f, x@pntr$getError())
  ── Error ('test_clamp_predictors.R:69:3'): clamping_predictor works on stars ───
  Error: [rast] empty srs
  Backtrace:
       ▆
    1. ├─terra::readRDS(...) at test_clamp_predictors.R:69:3
    2. └─terra::readRDS(...)
    3.   ├─terra::unwrap(x)
    4.   └─terra::unwrap(x)
    5.     └─terra (local) .local(x, ...)
    6.       ├─base::eval(parse(text = x@definition))
    7.       │ └─base::eval(parse(text = x@definition))
    8.       ├─terra::rast(...)
    9.       └─terra::rast(...)
   10.         └─terra (local) .local(x = x, ...)
   11.           └─terra:::new_rast(...)
   12.             └─terra:::messages(r, "rast")
   13.               └─terra:::error(f, x@pntr$getError())
  ── Error ('test_extrapol_mess.R:5:3'): mess_predictor works on SpatRasters and df ──
  Error: [rast] empty srs
  Backtrace:
       ▆
    1. ├─terra::readRDS(...) at test_extrapol_mess.R:5:3
    2. └─terra::readRDS(...)
    3.   ├─terra::unwrap(x)
    4.   └─terra::unwrap(x)
    5.     └─terra (local) .local(x, ...)
    6.       ├─base::eval(parse(text = x@definition))
    7.       │ └─base::eval(parse(text = x@definition))
    8.       ├─terra::rast(...)
    9.       └─terra::rast(...)
   10.         └─terra (local) .local(x = x, ...)
   11.           └─terra:::new_rast(...)
   12.             └─terra:::messages(r, "rast")
   13.               └─terra:::error(f, x@pntr$getError())
  ── Error ('test_extrapol_mess.R:71:3'): mess_predictor works on stars ──────────
  Error: [rast] empty srs
  Backtrace:
       ▆
    1. ├─... %>% stars::st_as_stars(as_attributes = TRUE) at test_extrapol_mess.R:71:3
    2. ├─stars::st_as_stars(., as_attributes = TRUE)
    3. ├─terra::readRDS(...)
    4. └─terra::readRDS(...)
    5.   ├─terra::unwrap(x)
    6.   └─terra::unwrap(x)
    7.     └─terra (local) .local(x, ...)
    8.       ├─base::eval(parse(text = x@definition))
    9.       │ └─base::eval(parse(text = x@definition))
   10.       ├─terra::rast(...)
   11.       └─terra::rast(...)
   12.         └─terra (local) .local(x = x, ...)
   13.           └─terra:::new_rast(...)
   14.             └─terra:::messages(r, "rast")
   15.               └─terra:::error(f, x@pntr$getError())
  ── Error ('test_overlap_niche.R:3:3'): niche_overlap quantifies difference between rasters ──
  Error: [rast] empty srs
  Backtrace:
       ▆
    1. ├─terra::readRDS(...) at test_overlap_niche.R:3:3
    2. └─terra::readRDS(...)
    3.   ├─terra::unwrap(x)
    4.   └─terra::unwrap(x)
    5.     └─terra (local) .local(x, ...)
    6.       ├─base::eval(parse(text = x@definition))
    7.       │ └─base::eval(parse(text = x@definition))
    8.       ├─terra::rast(...)
    9.       └─terra::rast(...)
   10.         └─terra (local) .local(x = x, ...)
   11.           └─terra:::new_rast(...)
   12.             └─terra:::messages(r, "rast")
   13.               └─terra:::error(f, x@pntr$getError())
  ── Error ('test_predict_raster.R:2:1'): (code run outside of `test_that()`) ────
  Error: [rast] empty srs
  Backtrace:
       ▆
    1. ├─terra::readRDS(...) at test_predict_raster.R:2:1
    2. └─terra::readRDS(...)
    3.   ├─terra::unwrap(x)
    4.   └─terra::unwrap(x)
    5.     └─terra (local) .local(x, ...)
    6.       ├─base::eval(parse(text = x@definition))
    7.       │ └─base::eval(parse(text = x@definition))
    8.       ├─terra::rast(...)
    9.       └─terra::rast(...)
   10.         └─terra (local) .local(x = x, ...)
   11.           └─terra:::new_rast(...)
   12.             └─terra:::messages(r, "rast")
   13.               └─terra:::error(f, x@pntr$getError())
  ── Error ('test_thin_by_cell.R:6:3'): thin_by_cell respects projections ────────
  Error: [rast] empty srs
  Backtrace:
       ▆
    1. ├─terra::readRDS(system.file("extdata/lacerta_land_mask.rds", package = "tidysdm")) at test_thin_by_cell.R:6:3
    2. └─terra::readRDS(system.file("extdata/lacerta_land_mask.rds", package = "tidysdm"))
    3.   ├─terra::unwrap(x)
    4.   └─terra::unwrap(x)
    5.     └─terra (local) .local(x, ...)
    6.       ├─base::eval(parse(text = x@definition))
    7.       │ └─base::eval(parse(text = x@definition))
    8.       ├─terra::rast(...)
    9.       └─terra::rast(...)
   10.         └─terra (local) .local(x = x, ...)
   11.           └─terra:::new_rast(...)
   12.             └─terra:::messages(r, "rast")
   13.               └─terra:::error(f, x@pntr$getError())
  ── Error ('test_thin_by_cell_time.R:5:1'): (code run outside of `test_that()`) ──
  Error: [rast] empty srs
  Backtrace:
      ▆
   1. ├─terra::rast(...) at test_thin_by_cell_time.R:5:1
   2. └─terra::rast(...)
   3.   └─terra (local) .local(x, ...)
   4.     ├─terra::rast(nrows = nrow(x), ncols = ncol(x), crs = crs, extent = extent)
   5.     └─terra::rast(nrows = nrow(x), ncols = ncol(x), crs = crs, extent = extent)
   6.       └─terra (local) .local(x = x, ...)
   7.         └─terra:::new_rast(...)
   8.           └─terra:::messages(r, "rast")
   9.             └─terra:::error(f, x@pntr$getError())
  
  [ FAIL 9 | WARN 12 | SKIP 1 | PASS 274 ]
  Error:
  ! Test failures.
  Execution halted