Running ‘testthat.R’ [19s/22s]
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
  > 
  > library(testthat)
  > library(eventPred)
  > 
  > test_check("eventPred")
  Saving _problems/test-getPrediction-30.R
  Saving _problems/test-getPrediction-51.R
  Saving _problems/test-getPrediction-69.R
  Saving _problems/test-predictEvent-33.R
  Saving _problems/test-predictEvent-74.R
  Saving _problems/test-predictEvent-102.R
  [ FAIL 6 | WARN 0 | SKIP 0 | PASS 28 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-getPrediction.R:21:3'): event prediction at design stage ───────
  Error in ``[.data.table`(newEvents[get("event") == 1], do.call("order", lapply(c("draw", "totalTime"), as.name)), `:=`(n = seq_len(.N)), by = "draw")`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─eventPred::getPrediction(...) at test-getPrediction.R:21:3
   2.   └─eventPred::predictEvent(...)
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-getPrediction.R:42:3'): event prediction during enrollment phase ──
  Error in ``[.data.table`(newEvents[get("event") == 1], do.call("order", lapply(c("draw", "totalTime"), as.name)), `:=`(n = seq_len(.N)), by = "draw")`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─eventPred::getPrediction(...) at test-getPrediction.R:42:3
   2.   └─eventPred::predictEvent(...)
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-getPrediction.R:63:3'): event prediction after enrollment completion ──
  Error in ``[.data.table`(newEvents[get("event") == 1], do.call("order", lapply(c("draw", "totalTime"), as.name)), `:=`(n = seq_len(.N)), by = "draw")`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─eventPred::getPrediction(...) at test-getPrediction.R:63:3
   2.   └─eventPred::predictEvent(...)
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-predictEvent.R:27:3'): event prediction at design stage ────────
  Error in ``[.data.table`(newEvents[get("event") == 1], do.call("order", lapply(c("draw", "totalTime"), as.name)), `:=`(n = seq_len(.N)), by = "draw")`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─eventPred::predictEvent(...) at test-predictEvent.R:27:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-predictEvent.R:68:3'): event prediction during enrollment stage ──
  Error in ``[.data.table`(newEvents[get("event") == 1], do.call("order", lapply(c("draw", "totalTime"), as.name)), `:=`(n = seq_len(.N)), by = "draw")`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─eventPred::predictEvent(...) at test-predictEvent.R:68:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-predictEvent.R:97:3'): event prediction after enrollment completion ──
  Error in ``[.data.table`(newEvents[get("event") == 1], do.call("order", lapply(c("draw", "totalTime"), as.name)), `:=`(n = seq_len(.N)), by = "draw")`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─eventPred::predictEvent(...) at test-predictEvent.R:97:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  
  [ FAIL 6 | WARN 0 | SKIP 0 | PASS 28 ]
  Error:
  ! Test failures.
  Execution halted