Running examples in ‘itsdm-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: isotree_po
> ### Title: Function to run extended isolation forest as SDM.
> ### Aliases: isotree_po
> 
> ### ** Examples
> 
> ## No test: 
> # Using a pseudo presence-only occurrence dataset of
> # virtual species provided in this package
> library(dplyr)

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

> library(sf)
Linking to GEOS 3.8.1, GDAL 3.2.1, PROJ 7.2.1; sf_use_s2() is TRUE
> library(stars)
Loading required package: abind
> library(itsdm)
> 
> # Prepare data
> data("occ_virtual_species")
> occ_virtual_species <- occ_virtual_species %>%
+   mutate(id = row_number())
> 
> set.seed(11)
> occ <- occ_virtual_species %>% sample_frac(0.7)
> occ_test <- occ_virtual_species %>% filter(! id %in% occ$id)
> occ <- occ %>% select(-id)
> occ_test <- occ_test %>% select(-id)
> 
> env_vars <- system.file(
+   'extdata/bioclim_tanzania_10min.tif',
+   package = 'itsdm') %>% read_stars() %>%
+   slice('band', c(1, 5, 12))
> 
> # Modeling
> mod_virtual_species <- isotree_po(
+   occ = occ, occ_test = occ_test,
+   variables = env_vars, ntrees = 10,
+   sample_rate = 0.6, ndim = 1L,
+   seed = 123L)
Warning in isolation.forest(occ_mat %>% st_drop_geometry(), ntrees = ntrees,  :
  Attempting to use more than 1 thread, but package was compiled without OpenMP support. See https://mac.r-project.org/openmp/
Warning in isolation.forest(ind_var_occ, ntrees = model$params$ntrees, sample_size = model$params$sample_size,  :
  Attempting to use more than 1 thread, but package was compiled without OpenMP support. See https://mac.r-project.org/openmp/
Warning in isolation.forest(ind_var_occ, ntrees = model$params$ntrees, sample_size = model$params$sample_size,  :
  Attempting to use more than 1 thread, but package was compiled without OpenMP support. See https://mac.r-project.org/openmp/
Warning in isolation.forest(ind_var_occ, ntrees = model$params$ntrees, sample_size = model$params$sample_size,  :
  Attempting to use more than 1 thread, but package was compiled without OpenMP support. See https://mac.r-project.org/openmp/
Warning in isolation.forest(ind_var_occ, ntrees = model$params$ntrees, sample_size = model$params$sample_size,  :
  Attempting to use more than 1 thread, but package was compiled without OpenMP support. See https://mac.r-project.org/openmp/
Warning in isolation.forest(ind_var_occ, ntrees = model$params$ntrees, sample_size = model$params$sample_size,  :
  Attempting to use more than 1 thread, but package was compiled without OpenMP support. See https://mac.r-project.org/openmp/
Warning in isolation.forest(ind_var_occ, ntrees = model$params$ntrees, sample_size = model$params$sample_size,  :
  Attempting to use more than 1 thread, but package was compiled without OpenMP support. See https://mac.r-project.org/openmp/
Warning in isolation.forest(this_var_occ, ntrees = model$params$ntrees,  :
  Attempting to use more than 1 thread, but package was compiled without OpenMP support. See https://mac.r-project.org/openmp/
Warning in isolation.forest(except_var_occ, ntrees = model$params$ntrees,  :
  Attempting to use more than 1 thread, but package was compiled without OpenMP support. See https://mac.r-project.org/openmp/
Warning in isolation.forest(this_var_occ, ntrees = model$params$ntrees,  :
  Attempting to use more than 1 thread, but package was compiled without OpenMP support. See https://mac.r-project.org/openmp/
Warning in isolation.forest(except_var_occ, ntrees = model$params$ntrees,  :
  Attempting to use more than 1 thread, but package was compiled without OpenMP support. See https://mac.r-project.org/openmp/
Warning in isolation.forest(this_var_occ, ntrees = model$params$ntrees,  :
  Attempting to use more than 1 thread, but package was compiled without OpenMP support. See https://mac.r-project.org/openmp/
Warning in isolation.forest(except_var_occ, ntrees = model$params$ntrees,  :
  Attempting to use more than 1 thread, but package was compiled without OpenMP support. See https://mac.r-project.org/openmp/
> 
> # Check results
> ## Evaluation based on training dataset
> print(mod_virtual_species$eval_train)
===================================
Presence-only evaluation:
CVI with 0.25 threshold:      0.061
CVI with 0.5 threshold:       0.404
CVI with 0.75 threshold:      0.294
CBI:                          AUC (ratio)                   0.752
===================================
Presence-background evaluation:
Sensitivity:                  0.833
Specificity:                  0.681
TSS:                          0.514
AUC:                          0.794
Similarity indices:
Jaccard's similarity index:   0.632
Sørensen's similarity index:  0.774
Overprediction rate:          0.277
Underprediction rate:         0.167
===================================
Presence-only evaluation:
CVI with 0.25 threshold:      0.061
CVI with 0.5 threshold:       0.404
CVI with 0.75 threshold:      0.294
CBI:                          AUC (ratio)                   0.752
===================================
Presence-background evaluation:
Sensitivity:                  0.833
Specificity:                  0.681
TSS:                          0.514
AUC:                          0.794
Similarity indices:
Jaccard's similarity index:   0.632
Sørensen's similarity index:  0.774
Overprediction rate:          0.277
Underprediction rate:         0.167
> plot(mod_virtual_species$eval_train)
Error in round(po_eval$boyce$Spearman.cor, 3) : 
  non-numeric argument to mathematical function
Calls: plot -> plot.POEvaluation -> geom_text -> layer -> sprintf
Execution halted