Running ‘testthat.R’ [115s/141s]
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/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > Sys.setenv("OMP_THREAD_LIMIT" = 2)
  > origDTthreads <- data.table::setDTthreads(2L)
  > 
  > library(testthat)
  > library(SpaDES.tools)
  > 
  > test_check("SpaDES.tools")
  
  Attaching package: 'data.table'
  
  The following object is masked from 'package:base':
  
      %notin%
  
  Assuming matrix is in latitude/longitude
  The CRS provided is not in meters; converting internally to UTM so area will be approximately correct.
  Ran 10/10 deferred expressions
  Ran 8/8 deferred expressions
  Ran 6/6 deferred expressions
  Ran 7/7 deferred expressions
  Ran 6/6 deferred expressions
  Ran 8/8 deferred expressions
  duplicate initial loci are provided
  duplicate initial loci are provided
  1
  2
  3
  4
  5
  6
  7
  8
  9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  [ FAIL 5 | WARN 0 | SKIP 4 | PASS 1802 ]
  
  ══ Skipped tests (4) ═══════════════════════════════════════════════════════════
  • On CRAN (3): 'test-splitRaster.R:227:3', 'test-splitRaster.R:288:3',
    'test-spread.R:1225:3'
  • {NLMR} is not installed (1): 'test-neutralLandscapeMap.R:2:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-spread.R:659:7'): spread stopRule does not work correctly ──────
  Error in ``[.data.table`(circs, , `:=`(numEvents, sum(unique(id))), by = indices)`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─circs[, `:=`(numEvents, sum(unique(id))), by = indices] at test-spread.R:659:7
   2. └─data.table:::`[.data.table`(...) at test-spread.R:659:7
  ── Error ('test-spread2.R:135:5'): spread2 tests ───────────────────────────────
  Error in ``[.data.table`(dt, , `:=`(dups = duplicatedInt(pixels)), by = "initialPixels")`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─SpaDES.tools::spread2(...) at test-spread2.R:135:5
   2.   ├─dt[, `:=`(dups = duplicatedInt(pixels)), by = "initialPixels"]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-spread2.R:400:5'): spread2 tests -- asymmetry ──────────────────
  Error in ``[.data.table`(dd, , `:=`(quantityAdj2, quantityAdj/(mean(quantityAdj)/mean(quantity))), by = "id")`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─SpaDES.tools::spread2(...) at test-spread2.R:400:5
   2.   └─SpaDES.tools:::asymmetryAdjust(...)
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Failure ('test-spread2.R:653:5'): spread2 tests ─────────────────────────────
  Expected `{ ... }` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 6/6 in VECTOR_ELT
  ── Error ('test-spread2.R:658:5'): spread2 tests ───────────────────────────────
  Error in `eval(code, test_env)`: object 'out' not found
  Backtrace:
      ▆
   1. ├─testthat::expect_true("effectiveDistance" %in% colnames(out)) at test-spread2.R:658:5
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─"effectiveDistance" %in% colnames(out)
   5. └─base::colnames(out)
   6.   └─base::is.data.frame(x)
  
  [ FAIL 5 | WARN 0 | SKIP 4 | PASS 1802 ]
  Error:
  ! Test failures.
  Execution halted