Running ‘spelling.R’
  Running ‘testthat.R’ [108s/130s]
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.1 
  ✔ infer        1.0.9      ✔ 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")
  
  Attaching package: 'plotrix'
  
  The following object is masked from 'package:scales':
  
      rescale
  
  i Creating pre-processing data to finalize 1 unknown parameter: "mtry"
  Saving _problems/test_explain_tidysdm-121.R
  Saving _problems/test_overlap_niche-14.R
  Saving _problems/test_predict_raster-8.R
  i Creating pre-processing data to finalize 1 unknown parameter: "mtry"
  [ FAIL 3 | WARN 0 | SKIP 1 | PASS 314 ]
  
  ══ Skipped tests (1) ═══════════════════════════════════════════════════════════
  • On CRAN (1): 'test_filter_collinear.R:2:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_explain_tidysdm.R:121:3'): explain_tidysdm works with response provided directly ──
  Error in `xgb.get.handle(model)`: 'xgb.Booster' object is corrupted or is from an incompatible XGBoost version.
  Backtrace:
       ▆
    1. ├─testthat::expect_true(all.equal(test_explainer, test_explainer_y)) at test_explain_tidysdm.R:121:3
    2. │ └─testthat::quasi_label(enquo(object), label)
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─base::all.equal(test_explainer, test_explainer_y)
    5. └─base::all.equal.default(test_explainer, test_explainer_y)
    6.   └─base::all.equal.list(target, current, ...)
    7.     ├─base::all.equal(...)
    8.     └─base::all.equal.default(...)
    9.       └─base::all.equal.list(target, current, ...)
   10.         ├─base::all.equal(...)
   11.         └─base::all.equal.list(...)
   12.           ├─base::all.equal(...)
   13.           └─base::all.equal.default(...)
   14.             └─base::all.equal.list(target, current, ...)
   15.               ├─base::all.equal(...)
   16.               └─base::all.equal.default(...)
   17.                 └─base::all.equal.list(target, current, ...)
   18.                   ├─base::all.equal(...)
   19.                   └─base::all.equal.default(...)
   20.                     └─base::all.equal.list(target, current, ...)
   21.                       ├─base::all.equal(...)
   22.                       └─base::all.equal.default(...)
   23.                         └─base::all.equal.list(target, current, ...)
   24.                           └─base::attr.all.equal(target, current, ...)
   25.                             ├─base::length(target)
   26.                             └─xgboost:::length.xgb.Booster(target)
   27.                               └─xgboost::xgb.get.num.boosted.rounds(x)
   28.                                 └─xgboost:::xgb.get.handle(model)
  ── Error ('test_overlap_niche.R:14:3'): niche_overlap quantifies difference between rasters ──
  Error in `xgb.get.handle(object)`: 'xgb.Booster' object is corrupted or is from an incompatible XGBoost version.
  Backtrace:
       ▆
    1. ├─tidysdm::predict_raster(lacerta_ensemble, climate_present) at test_overlap_niche.R:14:3
    2. ├─tidysdm:::predict_raster.default(lacerta_ensemble, climate_present)
    3. │ ├─stats::predict(object, rast_sub_values, ...)
    4. │ └─tidysdm:::predict.simple_ensemble(object, rast_sub_values, ...)
    5. │   └─base::lapply(...)
    6. │     ├─stats (local) FUN(X[[i]], ...)
    7. │     └─workflows:::predict.workflow(X[[i]], ...)
    8. │       ├─stats::predict(fit, new_data, type = type, opts = opts, ...)
    9. │       └─parsnip::predict.model_fit(...)
   10. │         ├─parsnip:::predict_classprob(...)
   11. │         └─parsnip::predict_classprob.model_fit(...)
   12. │           └─rlang::eval_tidy(pred_call)
   13. └─parsnip::xgb_predict(object = object$fit, new_data = new_data)
   14.   ├─stats::predict(object, new_data, ...)
   15.   └─xgboost:::predict.xgb.Booster(object, new_data, ...)
   16.     └─xgboost:::xgb.best_iteration(object)
   17.       └─xgboost::xgb.attr(bst, "best_iteration")
   18.         └─xgboost:::xgb.get.handle(object)
  ── Error ('test_predict_raster.R:8:3'): predict_raster works correctly in chunks ──
  Error in `xgb.get.handle(object)`: 'xgb.Booster' object is corrupted or is from an incompatible XGBoost version.
  Backtrace:
       ▆
    1. ├─tidysdm::predict_raster(lacerta_ensemble, climate_future) at test_predict_raster.R:8:3
    2. ├─tidysdm:::predict_raster.default(lacerta_ensemble, climate_future)
    3. │ ├─stats::predict(object, rast_sub_values, ...)
    4. │ └─tidysdm:::predict.simple_ensemble(object, rast_sub_values, ...)
    5. │   └─base::lapply(...)
    6. │     ├─stats (local) FUN(X[[i]], ...)
    7. │     └─workflows:::predict.workflow(X[[i]], ...)
    8. │       ├─stats::predict(fit, new_data, type = type, opts = opts, ...)
    9. │       └─parsnip::predict.model_fit(...)
   10. │         ├─parsnip:::predict_classprob(...)
   11. │         └─parsnip::predict_classprob.model_fit(...)
   12. │           └─rlang::eval_tidy(pred_call)
   13. └─parsnip::xgb_predict(object = object$fit, new_data = new_data)
   14.   ├─stats::predict(object, new_data, ...)
   15.   └─xgboost:::predict.xgb.Booster(object, new_data, ...)
   16.     └─xgboost:::xgb.best_iteration(object)
   17.       └─xgboost::xgb.attr(bst, "best_iteration")
   18.         └─xgboost:::xgb.get.handle(object)
  
  [ FAIL 3 | WARN 0 | SKIP 1 | PASS 314 ]
  Error:
  ! Test failures.
  Execution halted