Running ‘testthat.R’ [22s/35s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(blockCV)
  > 
  > test_check("blockCV")
    train_0 train_1 test_0 test_1
  1      89     116     49      0
  2     110     108     28      8
  3     111     116     27      0
  4     127      27     11     89
  5     115      97     23     19
    train test
  1   183   71
  2   208   46
  3   211   43
  4   213   41
  5   201   53
  [1] "EnvironmentalBlock"
    train test
  1   198   56
  2   241   13
  3   219   35
  4   223   31
  5   135  119
     train test
  1     47    3
  2     47    3
  3     48    2
  4     46    4
  5     49    1
  6     48    2
  7     38   12
  8     48    2
  9     47    3
  10    45    5
  11    46    4
  12    47    3
  13    47    3
  14    48    2
  15    49    1
  [1] "SpatialAutoRange"
  [1] "SpatialAutoRange"
  The best folds was in iteration 5:
    train_0 train_1 test_0 test_1
  1     101      53     37     63
  2     118      96     20     20
  3     117     113     21      3
  4     121     107     17      9
  5      95      95     43     21
    train test
  1   234   20
  2   215   39
  3   177   77
  4   175   79
  5   215   39
  [1] "SpatialBlock"
    train test
  1   167   87
  2    87  167
  [1] "SpatialBlock"
  The best folds was in iteration 81:
    train test
  1   211   43
  2   207   47
  3   173   81
  4   209   45
  5   216   38
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (8)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (testBuffering.R:74:3): test that buffering function works properly with no species specified ──
  Error: The coordinate reference system of speciesData must be defined.
  Backtrace:
      █
   1. └─blockCV::buffering(...) testBuffering.R:74:2
  ── Error (testSpatialBlock.R:98:3): test spatiaBlock function with non-numeric iteration ──
  Error: st_crs(x) == st_crs(y) is not TRUE
  Backtrace:
      █
   1. └─blockCV::spatialBlock(...) testSpatialBlock.R:98:2
   2.   ├─net[speciesData, ]
   3.   └─sf:::`[.sf`(net, speciesData, )
   4.     ├─base::lengths(op(x, i, ...))
   5.     ├─sf:::op(x, i, ...)
   6.     └─sf:::st_intersects.sf(x, i, ...)
   7.       └─sf:::st_geos_binop(...)
   8.         └─base::stopifnot(st_crs(x) == st_crs(y))
  ── Error (testSpatialBlock.R:163:3): test spatiaBlock with user-defined blocks ──
  Error: st_crs(x) == st_crs(y) is not TRUE
  Backtrace:
      █
   1. └─blockCV::spatialBlock(...) testSpatialBlock.R:163:2
   2.   ├─net[speciesData, ]
   3.   └─sf:::`[.sf`(net, speciesData, )
   4.     ├─base::lengths(op(x, i, ...))
   5.     ├─sf:::op(x, i, ...)
   6.     └─sf:::st_intersects.sf(x, i, ...)
   7.       └─sf:::st_geos_binop(...)
   8.         └─base::stopifnot(st_crs(x) == st_crs(y))
  ── Error (testSpatialBlock.R:200:3): test spatiaBlock function with NULL numLimit ──
  Error: st_crs(x) == st_crs(y) is not TRUE
  Backtrace:
      █
   1. └─blockCV::spatialBlock(...) testSpatialBlock.R:200:2
   2.   ├─net[speciesData, ]
   3.   └─sf:::`[.sf`(net, speciesData, )
   4.     ├─base::lengths(op(x, i, ...))
   5.     ├─sf:::op(x, i, ...)
   6.     └─sf:::st_intersects.sf(x, i, ...)
   7.       └─sf:::st_geos_binop(...)
   8.         └─base::stopifnot(st_crs(x) == st_crs(y))
  
  [ FAIL 4 | WARN 11 | SKIP 8 | PASS 161 ]
  Error: Test failures
  Execution halted