Running ‘testthat.R’ [13s/17s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(spatsoc)
  Note: spatsoc has been updated to follow the R-spatial evolution. 
  Package dependencies and some functions have been modified. 
  Please see the NEWS for details: 
  https://docs.ropensci.org/spatsoc/index.html#news
  > library(data.table)
  
  Attaching package: 'data.table'
  
  The following object is masked from 'package:base':
  
      %notin%
  
  > library(sf)
  Linking to GEOS 3.14.1, GDAL 3.12.0, PROJ 9.7.1; sf_use_s2() is TRUE
  > data.table::setDTthreads(1)
  > test_check("spatsoc")
  Saving _problems/test-build-lines-156.R
  Saving _problems/test-dyad-7.R
  Saving _problems/test-edge-dist-180.R
  Saving _problems/test-edge-dist-194.R
  Saving _problems/test-edge-dist-229.R
  Saving _problems/test-edge-dist-301.R
  Saving _problems/test-edge-nn-166.R
  Saving _problems/test-edge-nn-179.R
  Saving _problems/test-edge-nn-216.R
  Saving _problems/test-edge-nn-268.R
  Saving _problems/test-edge-nn-284.R
  Saving _problems/test-edge-nn-311.R
  Saving _problems/test-gbi-13.R
  Saving _problems/test-group-lines-42.R
  Saving _problems/test-group-lines-133.R
  Saving _problems/test-group-lines-168.R
  Saving _problems/test-group-lines-216.R
  Saving _problems/test-group-lines-255.R
  Saving _problems/test-group-lines-302.R
  Saving _problems/test-group-lines-324.R
  Saving _problems/test-group-lines-347.R
  Saving _problems/test-group-lines-364.R
  Saving _problems/test-group-lines-391.R
  Saving _problems/test-group-lines-496.R
  Saving _problems/test-group-polys-216.R
  Saving _problems/test-group-polys-244.R
  Saving _problems/test-group-polys-282.R
  Saving _problems/test-group-polys-299.R
  Saving _problems/test-group-polys-346.R
  Saving _problems/test-group-polys-391.R
  Saving _problems/test-group-polys-456.R
  Saving _problems/test-pts-8.R
  Saving _problems/test-random-10.R
  Saving _problems/test-time-32.R
  Saving _problems/test-time-45.R
  Saving _problems/test-time-100.R
  Saving _problems/test-time-121.R
  Saving _problems/test-time-132.R
  Saving _problems/test-time-171.R
  Saving _problems/test-time-205.R
  Saving _problems/test-time-215.R
  Saving _problems/test-time-246.R
  Saving _problems/test-time-274.R
  Saving _problems/test-time-298.R
  Saving _problems/test-time-314.R
  [ FAIL 45 | WARN 1 | SKIP 0 | PASS 120 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-build-lines.R:156:3'): returns same number of lines as unique IDs/splitBy provided ──
  Error in ``[.data.table`(DT, , `:=`(count, .N), by = splitBy)`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─DT[, `:=`(count, .N), by = splitBy] at test-build-lines.R:156:3
   2. └─data.table:::`[.data.table`(DT, , `:=`(count, .N), by = splitBy) at test-build-lines.R:156:3
  ── Error ('test-dyad.R:7:1'): (code run outside of `test_that()`) ──────────────
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate"))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─spatsoc::group_times(DT, datetime = "datetime", threshold = "20 minutes") at test-dyad.R:7:1
   2.   ├─dtm[, `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate")]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-edge-dist.R:180:3'): duplicate IDs in a timegroup detected ─────
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = .(hours, adjIDate))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "8 hours") at test-edge-dist.R:180:3
   2.   ├─dtm[, `:=`(timegroup, .GRP), by = .(hours, adjIDate)]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-edge-dist.R:194:3'): returned IDs make sense ───────────────────
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate"))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "10 minutes") at test-edge-dist.R:194:3
   2.   ├─dtm[, `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate")]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-edge-dist.R:229:3'): returnDist works ──────────────────────────
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate"))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "10 minutes") at test-edge-dist.R:229:3
   2.   ├─dtm[, `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate")]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-edge-dist.R:301:3'): warns about splitBy column ────────────────
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate"))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─spatsoc::group_times(copyDT, "datetime", "5 minutes") at test-edge-dist.R:301:3
   2.   ├─dtm[, `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate")]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-edge-nn.R:166:3'): duplicate IDs in a timegroup detected ───────
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = .(hours, adjIDate))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "8 hours") at test-edge-nn.R:166:3
   2.   ├─dtm[, `:=`(timegroup, .GRP), by = .(hours, adjIDate)]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-edge-nn.R:179:3'): returned IDs make sense ─────────────────────
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate"))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "10 minutes") at test-edge-nn.R:179:3
   2.   ├─dtm[, `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate")]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-edge-nn.R:216:3'): returned columns match ──────────────────────
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate"))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "10 minutes") at test-edge-nn.R:216:3
   2.   ├─dtm[, `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate")]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-edge-nn.R:268:3'): distances returned are below threshold ──────
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate"))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "10 minutes") at test-edge-nn.R:268:3
   2.   ├─dtm[, `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate")]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-edge-nn.R:284:3'): NAs exist in NN when threshold provided ─────
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate"))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "10 minutes") at test-edge-nn.R:284:3
   2.   ├─dtm[, `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate")]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-edge-nn.R:311:3'): warns about splitBy column ──────────────────
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate"))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─spatsoc::group_times(copyDT, "datetime", "5 minutes") at test-edge-nn.R:311:3
   2.   ├─dtm[, `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate")]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-gbi.R:13:1'): (code run outside of `test_that()`) ──────────────
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate"))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─spatsoc::group_times(DT, "datetime", "5 minutes") at test-gbi.R:13:1
   2.   ├─dtm[, `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate")]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-group-lines.R:42:3'): coords, id, projection provided and proper format ──
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = .(data.table::year(idate), data.table::yday(idate)))`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "1 day") at test-group-lines.R:42:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-group-lines.R:131:3'): timegroup is correctly provided but is not required ──
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), .(year(idate), block))`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-group-lines.R:131:3
   2. │ └─base::withCallingHandlers(...)
   3. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "14 days")
   4.   ├─dtm[, `:=`(timegroup, .GRP), .(year(idate), block)]
   5.   └─data.table:::`[.data.table`(...)
  ── Error ('test-group-lines.R:166:3'): threshold is correctly provided, or error ──
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), .(year(idate), block))`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-group-lines.R:166:3
   2. │ └─base::withCallingHandlers(...)
   3. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "14 days")
   4.   ├─dtm[, `:=`(timegroup, .GRP), .(year(idate), block)]
   5.   └─data.table:::`[.data.table`(...)
  ── Error ('test-group-lines.R:214:3'): group lines returns a single warning for <2 locs ──
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), .(year(idate), block))`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-group-lines.R:214:3
   2. │ └─base::withCallingHandlers(...)
   3. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "14 days")
   4.   ├─dtm[, `:=`(timegroup, .GRP), .(year(idate), block)]
   5.   └─data.table:::`[.data.table`(...)
  ── Error ('test-group-lines.R:253:3'): group column is added to result or NA if < 2 locs ──
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), .(year(idate), block))`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-group-lines.R:253:3
   2. │ └─base::withCallingHandlers(...)
   3. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "14 days")
   4.   ├─dtm[, `:=`(timegroup, .GRP), .(year(idate), block)]
   5.   └─data.table:::`[.data.table`(...)
  ── Error ('test-group-lines.R:300:3'): only one column added to the result DT ──
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), .(year(idate), block))`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-group-lines.R:300:3
   2. │ └─base::withCallingHandlers(...)
   3. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "14 days")
   4.   ├─dtm[, `:=`(timegroup, .GRP), .(year(idate), block)]
   5.   └─data.table:::`[.data.table`(...)
  ── Error ('test-group-lines.R:322:3'): no rows are added to the result DT ──────
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), .(year(idate), block))`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-group-lines.R:322:3
   2. │ └─base::withCallingHandlers(...)
   3. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "14 days")
   4.   ├─dtm[, `:=`(timegroup, .GRP), .(year(idate), block)]
   5.   └─data.table:::`[.data.table`(...)
  ── Error ('test-group-lines.R:345:3'): withinGroup is not returned to the user ──
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), .(year(idate), block))`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-group-lines.R:345:3
   2. │ └─base::withCallingHandlers(...)
   3. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "14 days")
   4.   ├─dtm[, `:=`(timegroup, .GRP), .(year(idate), block)]
   5.   └─data.table:::`[.data.table`(...)
  ── Error ('test-group-lines.R:364:3'): only 1 unique timegroup * splitBy ───────
  Error in ``[.data.table`(copyDT, , `:=`(nBy, .N), by = .(yr, mnth, ID))`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─copyDT[, `:=`(nBy, .N), by = .(yr, mnth, ID)] at test-group-lines.R:364:3
   2. └─data.table:::`[.data.table`(...) at test-group-lines.R:364:3
  ── Error ('test-group-lines.R:391:3'): group column succesfully detected ───────
  Error in ``[.data.table`(copyDT, , `:=`(nBy, .N), by = .(yr, mnth, ID))`: attempt access index 10/10 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─copyDT[, `:=`(nBy, .N), by = .(yr, mnth, ID)] at test-group-lines.R:391:3
   2. └─data.table:::`[.data.table`(...) at test-group-lines.R:391:3
  ── Error ('test-group-lines.R:496:3'): splitBy argument doesnt use splitBy column ──
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = .(data.table::year(idate), data.table::yday(idate)))`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─spatsoc::group_times(copyDT, "datetime", "1 day") at test-group-lines.R:496:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Failure ('test-group-polys.R:204:3'): ID field does not have spaces ─────────
  `group_polys(...)` threw an error with unexpected message.
  Expected match: "please ensure IDs do not contain spaces"
  Actual message: "attempt access index 7/7 in VECTOR_ELT"
  Backtrace:
      ▆
   1. ├─testthat::expect_error(...) at test-group-polys.R:204: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. └─spatsoc::group_polys(...)
   7.   ├─DT[, `:=`(nBy, .N), c(splitBy, id)]
   8.   └─data.table:::`[.data.table`(DT, , `:=`(nBy, .N), c(splitBy, id))
  ── Error ('test-group-polys.R:235:3'): column and row lengths returned make sense ──
  Error in ``[.data.table`(DT, , `:=`(nBy, .N), c(splitBy, id))`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─spatsoc::group_polys(...) at test-group-polys.R:235:3
   2.   ├─DT[, `:=`(nBy, .N), c(splitBy, id)]
   3.   └─data.table:::`[.data.table`(DT, , `:=`(nBy, .N), c(splitBy, id))
  ── Error ('test-group-polys.R:280:3'): withinGroup is not returned to the user ──
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), .(year(idate), block))`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-group-polys.R:280:3
   2. │ └─base::withCallingHandlers(...)
   3. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "14 days")
   4.   ├─dtm[, `:=`(timegroup, .GRP), .(year(idate), block)]
   5.   └─data.table:::`[.data.table`(...)
  ── Error ('test-group-polys.R:299:3'): group column succesfully detected ───────
  Error in ``[.data.table`(copyDT, , `:=`(nBy, .N), by = .(mnth, ID))`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─copyDT[, `:=`(nBy, .N), by = .(mnth, ID)] at test-group-polys.R:299:3
   2. └─data.table:::`[.data.table`(...) at test-group-polys.R:299:3
  ── Error ('test-group-polys.R:337:3'): area provided with splitBy does not return errors ──
  Error in ``[.data.table`(DT, , `:=`(nBy, .N), c(splitBy, id))`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─spatsoc::group_polys(...) at test-group-polys.R:337:3
   2.   ├─DT[, `:=`(nBy, .N), c(splitBy, id)]
   3.   └─data.table:::`[.data.table`(DT, , `:=`(nBy, .N), c(splitBy, id))
  ── Error ('test-group-polys.R:379:3'): less than 5 locs returns NAs and warning ──
  Error in ``[.data.table`(DT, , `:=`(nBy, .N), c(splitBy, id))`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_warning(...) at test-group-polys.R:379: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. └─spatsoc::group_polys(...)
   7.   ├─DT[, `:=`(nBy, .N), c(splitBy, id)]
   8.   └─data.table:::`[.data.table`(DT, , `:=`(nBy, .N), c(splitBy, id))
  ── Error ('test-group-polys.R:445:3'): splitBy argument doesnt use splitBy column ──
  Error in ``[.data.table`(DT, , `:=`(nBy, .N), c(splitBy, id))`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_true(...) at test-group-polys.R:445:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─base::suppressWarnings(...)
   5. │ └─base::withCallingHandlers(...)
   6. └─spatsoc::group_polys(...)
   7.   ├─DT[, `:=`(nBy, .N), c(splitBy, id)]
   8.   └─data.table:::`[.data.table`(DT, , `:=`(nBy, .N), c(splitBy, id))
  ── Error ('test-pts.R:8:1'): (code run outside of `test_that()`) ───────────────
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate"))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─spatsoc::group_times(DT, datetime = "datetime", threshold = "20 minutes") at test-pts.R:8:1
   2.   ├─dtm[, `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate")]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-random.R:10:1'): (code run outside of `test_that()`) ───────────
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate"))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─spatsoc::group_times(DT, datetime = "datetime", threshold = "1 hour") at test-random.R:10:1
   2.   ├─dtm[, `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate")]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-time.R:27:3'): threshold properly provided ─────────────────────
  Error in ``[.data.table`(DT, , `:=`(timegroup, .GRP), by = c(datetime))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_message(...) at test-time.R:27:3
   2. │ └─testthat:::quasi_capture(enquo(object), label, capture_messages)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = NULL)
   7.   ├─DT[, `:=`(timegroup, .GRP), by = c(datetime)]
   8.   └─data.table:::`[.data.table`(DT, , `:=`(timegroup, .GRP), by = c(datetime))
  ── Error ('test-time.R:45:3'): time fields are already present ─────────────────
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate"))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "10 minutes") at test-time.R:45:3
   2.   ├─dtm[, `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate")]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-time.R:99:5'): check that 60 minutes and 1 hour are the same result ──
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate"))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test-time.R:97:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "1 hour") at test-time.R:99:5
   5.   ├─dtm[, `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate")]
   6.   └─data.table:::`[.data.table`(...)
  ── Error ('test-time.R:119:3'): warns if block is not even ─────────────────────
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), .(year(idate), block))`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_warning(...) at test-time.R:119: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. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = blockLength)
   7.   ├─dtm[, `:=`(timegroup, .GRP), .(year(idate), block)]
   8.   └─data.table:::`[.data.table`(...)
  ── Error ('test-time.R:128:3'): timegroup column + time fields are added to result ──
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = .(data.table::year(idate), data.table::yday(idate)))`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_true(...) at test-time.R:128:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─"timegroup" %in% ...
   5. ├─base::colnames(group_times(copyDT, datetime = "datetime", threshold = "1 day"))
   6. │ └─base::is.data.frame(x)
   7. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "1 day")
   8.   ├─...[]
   9.   └─data.table:::`[.data.table`(...)
  ── Error ('test-time.R:170:3'): timegroup column and fields are detected if already present ──
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), .(year(idate), block))`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-time.R:170:3
   2. │ └─base::withCallingHandlers(...)
   3. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "2 days")
   4.   ├─dtm[, `:=`(timegroup, .GRP), .(year(idate), block)]
   5.   └─data.table:::`[.data.table`(...)
  ── Error ('test-time.R:201:3'): warns if no threshold provided ─────────────────
  Error in ``[.data.table`(DT, , `:=`(timegroup, .GRP), by = c(datetime))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_message(...) at test-time.R:201:3
   2. │ └─testthat:::quasi_capture(enquo(object), label, capture_messages)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─spatsoc::group_times(copyDT, datetime = "datetime")
   7.   ├─DT[, `:=`(timegroup, .GRP), by = c(datetime)]
   8.   └─data.table:::`[.data.table`(DT, , `:=`(timegroup, .GRP), by = c(datetime))
  ── Error ('test-time.R:211:3'): warns if threshold is fractional ───────────────
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = .(hours, adjIDate))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_warning(...) at test-time.R:211: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. └─spatsoc::group_times(copyDT, datetime = "datetime", threshold = "2.5 hours")
   7.   ├─dtm[, `:=`(timegroup, .GRP), by = .(hours, adjIDate)]
   8.   └─data.table:::`[.data.table`(...)
  ── Error ('test-time.R:242:3'): multiyear blocks are well handled ──────────────
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = .(data.table::year(idate), data.table::yday(idate)))`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test-time.R:242:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─spatsoc::group_times(copyDT, datetime = "isoDate", threshold = "1 day")
   5.   ├─...[]
   6.   └─data.table:::`[.data.table`(...)
  ── Error ('test-time.R:271:3'): group_times nearest hour with minutes threshold ──
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate"))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test-time.R:271:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─spatsoc::group_times(DT, c("idate", "itime"), threshold = "5 minutes")
   5.   ├─dtm[, `:=`(timegroup, .GRP), by = c("adjMinute", "adjHour", "adjDate")]
   6.   └─data.table:::`[.data.table`(...)
  ── Error ('test-time.R:298:3'): timegroups are based off years but blocks are consistent across all years ──
  Error in ``[.data.table`(dtm, , `:=`(timegroup, .GRP), .(year(idate), block))`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(group_times(copyDT, "datetime", "10 days")) at test-time.R:298:3
   2. │ └─base::withCallingHandlers(...)
   3. └─spatsoc::group_times(copyDT, "datetime", "10 days")
   4.   ├─dtm[, `:=`(timegroup, .GRP), .(year(idate), block)]
   5.   └─data.table:::`[.data.table`(...)
  ── Error ('test-time.R:314:3'): datetime argument doesnt use datetime column ───
  Error in ``[.data.table`(DT, , `:=`(timegroup, .GRP), by = c(datetime))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─spatsoc::group_times(copyDT, "date") at test-time.R:314:3
   2.   ├─DT[, `:=`(timegroup, .GRP), by = c(datetime)]
   3.   └─data.table:::`[.data.table`(DT, , `:=`(timegroup, .GRP), by = c(datetime))
  
  [ FAIL 45 | WARN 1 | SKIP 0 | PASS 120 ]
  Error:
  ! Test failures.
  Execution halted