Running 'testthat.R' [15s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(regional)
  > library(terra)
  terra 1.8.86
  
  Attaching package: 'terra'
  
  The following objects are masked from 'package:testthat':
  
      compare, describe
  
  > if (requireNamespace("sf", quietly = TRUE)) {
  +   library(sf)
  +   volcano = rast(system.file("raster/volcano.tif", package = "regional"))
  +   vr = read_sf(system.file("regions/volcano_regions.gpkg", package = "regional"))
  + 
  +   ortho = rast(system.file("raster/ortho.tif", package = "supercells"))
  +   vo = supercells::supercells(ortho, k = 1000, compactness = 1)
  + 
  +   test_check("regional")
  + }
  Linking to GEOS 3.13.0, GDAL 3.10.1, PROJ 9.5.1; sf_use_s2() is TRUE
  Saving _problems/test-reg_distinction-5.R
  Metric: 'euclidean' with unit: 'log'; comparing: 0 vectors
  Saving _problems/test-reg_inhomogeneity-2.R
  Saving _problems/test-reg_isolation-5.R
  [ FAIL 3 | WARN 27 | SKIP 0 | PASS 2 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-reg_distinction.R:5:3'): reg_distinction works ───────────────
  Expected `mean(reg_dis)` to equal 1.95.
  Differences:
    `actual`: NaN
  `expected`: 1.9
  
  ── Error ('test-reg_inhomogeneity.R:2:1'): (code run outside of `test_that()`) ──
  Error in `dimnames(x) <- dn`: length of 'dimnames' [2] not equal to array extent
  Backtrace:
      ▆
   1. └─regional::reg_inhomogeneity(vr[1:2, ], volcano) at test-reg_inhomogeneity.R:2:1
   2.   ├─base::mean(...)
   3.   └─regional:::universal_distance(vals_i, dist_fun = dist_fun, ...)
   4.     └─philentropy::distance(...)
   5.       └─base::`colnames<-`(`*tmp*`, value = paste0("v", seq_len(ncols)))
  ── Failure ('test-reg_isolation.R:5:3'): reg_isolation works ───────────────────
  Expected `mean(reg_iso)` to equal 1.95.
  Differences:
    `actual`: NaN
  `expected`: 1.9
  
  
  [ FAIL 3 | WARN 27 | SKIP 0 | PASS 2 ]
  Error:
  ! Test failures.
  Execution halted