Running 'test-all.R' [47s]
Running the tests in 'tests/test-all.R' failed.
Complete output:
  > library(testthat)
  > test_check("grainscape")
  Loading required package: grainscape
  Writing layer `nodes' to data source 
    `D:\temp\2025_01_08_01_50_00_5874\Rtmp0IUckS\tiny_goc_thresh2' using driver `ESRI Shapefile'
  Writing 28 features with 5 fields and geometry type Point.
  Writing layer `linksCentroid' to data source 
    `D:\temp\2025_01_08_01_50_00_5874\Rtmp0IUckS\tiny_goc_thresh2' using driver `ESRI Shapefile'
  Writing 59 features with 15 fields and geometry type Line String.
  Writing layer `nodes' to data source 
    `D:\temp\2025_01_08_01_50_00_5874\Rtmp0IUckS\tiny_mpg' using driver `ESRI Shapefile'
  Writing 43 features with 4 fields and geometry type Point.
  Writing layer `linksCentroid' to data source 
    `D:\temp\2025_01_08_01_50_00_5874\Rtmp0IUckS\tiny_mpg' using driver `ESRI Shapefile'
  Writing 93 features with 12 fields and geometry type Line String.
  Writing layer `linksPerim' to data source 
    `D:\temp\2025_01_08_01_50_00_5874\Rtmp0IUckS\tiny_mpg' using driver `ESRI Shapefile'
  Writing 93 features with 8 fields and geometry type Line String.
  IGRAPH db752bd UN-- 43 89 -- 
  + attr: name (v/c), patchId (v/n), patchArea (v/n), patchEdgeArea
  | (v/n), coreArea (v/n), centroidX (v/n), centroidY (v/n), linkId
  | (e/n), lcpPerimWeight (e/n), startPerimX (e/n), startPerimY (e/n),
  | endPerimX (e/n), endPerimY (e/n)
  + edges from db752bd (vertex names):
   [1] 62 --74  30 --41  30 --40  7  --22  5  --7   80 --86  73 --78  29 --31 
   [9] 19 --29  67 --85  41 --48  40 --41  37 --41  8  --28  9  --12  12 --14 
  [17] 30 --48  8  --9   48 --54  95 --103 62 --64  5  --22  32 --37  74 --84 
  [25] 55 --56  5  --32  9  --28  68 --80  14 --19  30 --54  5  --37  54 --55 
  [33] 64 --74  86 --100 100--107 41 --50  56 --76  56 --61  103--105 9  --14 
  + ... omitted several edges
  [ FAIL 1 | WARN 2 | SKIP 0 | PASS 81 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-corridor-distance-point.R:31:3'): corridor handles NA values ───
  Error in `shortest_paths(x@th[[whichThresh]]$goc, which(V(x@th[[whichThresh]]$goc)$polygonId == 
      na.omit(startEndPolygons[1])), which(V(x@th[[whichThresh]]$goc)$polygonId == 
      na.omit(startEndPolygons[2])), weights = V(x@th[[whichThresh]]$goc)$meanWeight)`: At rinterface_extra.c:138 : Wrong index. Attempt to get element with index 0 from vector of length 0. Invalid value
  Backtrace:
      ▆
   1. ├─testthat::expect_warning(...) at test-corridor-distance-point.R:31:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─grainscape::corridor(goc, whichThresh = 2, coordSomeNA)
   7. └─grainscape::corridor(goc, whichThresh = 2, coordSomeNA)
   8.   └─grainscape (local) .local(x, ...)
   9.     └─igraph::shortest_paths(...)
  
  [ FAIL 1 | WARN 2 | SKIP 0 | PASS 81 ]
  Error: Test failures
  Execution halted