Running 'testthat.R' [9s]
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/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(edeaR)
  
  Attaching package: 'edeaR'
  
  The following object is masked from 'package:base':
  
      setdiff
  
  > 
  > test_check("edeaR")
  Saving _problems/test_idle_time-9.R
  Saving _problems/test_idle_time-28.R
  Saving _problems/test_idle_time-48.R
  Saving _problems/test_idle_time-69.R
  Saving _problems/test_idle_time-90.R
  Saving _problems/test_idle_time-114.R
  Saving _problems/test_idle_time-136.R
  Saving _problems/test_idle_time-159.R
  [ FAIL 8 | WARN 0 | SKIP 0 | PASS 106 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_idle_time.R:8:3'): test idle_time attr 'units' set when arg 'units' = 'auto' ──
  Error in ``[.data.table`(dt, , `:=`(active = cumsum(activate), next_TS = shift(TS, type = "lead")), by = "CID")`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─patients %>% idle_time(level = "log", units = "auto") at test_idle_time.R:8:3
   2. ├─edeaR::idle_time(., level = "log", units = "auto")
   3. └─edeaR:::idle_time.eventlog(., level = "log", units = "auto")
   4.   └─edeaR (local) FUN(log = log, units = units)
   5.     └─edeaR:::idle_time_case(log, units)
   6.       ├─...[]
   7.       └─data.table:::`[.data.table`(...)
  ── Error ('test_idle_time.R:27:3'): test idle_time on eventlog with arg 'level' = 'log' ──
  Error in ``[.data.table`(dt, , `:=`(active = cumsum(activate), next_TS = shift(TS, type = "lead")), by = "CID")`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─patients %>% idle_time(level = "log", units = "mins") at test_idle_time.R:27:3
   2. ├─edeaR::idle_time(., level = "log", units = "mins")
   3. └─edeaR:::idle_time.eventlog(., level = "log", units = "mins")
   4.   └─edeaR (local) FUN(log = log, units = units)
   5.     └─edeaR:::idle_time_case(log, units)
   6.       ├─...[]
   7.       └─data.table:::`[.data.table`(...)
  ── Error ('test_idle_time.R:47:3'): test idle_time on eventlog with arg 'level' = 'trace' ──
  Error in ``[.data.table`(dt, , `:=`(active = cumsum(activate), next_TS = shift(TS, type = "lead")), by = "CID")`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─patients %>% idle_time(level = "trace", units = "mins") at test_idle_time.R:47:3
   2. ├─edeaR::idle_time(., level = "trace", units = "mins")
   3. ├─edeaR:::idle_time.eventlog(., level = "trace", units = "mins")
   4. │ └─edeaR (local) FUN(log = log, units = units)
   5. │   └─log %>% idle_time_case(units = units)
   6. └─edeaR:::idle_time_case(., units = units)
   7.   ├─...[]
   8.   └─data.table:::`[.data.table`(...)
  ── Error ('test_idle_time.R:68:3'): test idle_time on eventlog with arg 'level' = 'case' ──
  Error in ``[.data.table`(dt, , `:=`(active = cumsum(activate), next_TS = shift(TS, type = "lead")), by = "CID")`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─patients %>% idle_time(level = "case", units = "mins") at test_idle_time.R:68:3
   2. ├─edeaR::idle_time(., level = "case", units = "mins")
   3. └─edeaR:::idle_time.eventlog(., level = "case", units = "mins")
   4.   └─edeaR (local) FUN(log = log, units = units)
   5.     ├─...[]
   6.     └─data.table:::`[.data.table`(...)
  ── Error ('test_idle_time.R:89:3'): test idle_time on eventlog with arg 'level' = 'resource' ──
  Error in ``[.data.table`(dt, , `:=`(active = cumsum(activate), next_TS = shift(TS, type = "lead")), by = "RID")`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─patients %>% idle_time(level = "resource", units = "mins") at test_idle_time.R:89:3
   2. ├─edeaR::idle_time(., level = "resource", units = "mins")
   3. └─edeaR:::idle_time.eventlog(., level = "resource", units = "mins")
   4.   └─edeaR (local) FUN(log = log, units = units)
   5.     ├─...[]
   6.     └─data.table:::`[.data.table`(...)
  ── Error ('test_idle_time.R:113:3'): test idle_time attr 'units' set when arg 'units' = 'auto' on grouped_eventlog ──
  <dplyr:::mutate_error/rlang_error/error/condition>
  Error in `mutate(., data = map(data, fun, ...))`: i In argument: `data = map(data, fun, ...)`.
  Caused by error in `map()`:
  i In index: 1.
  Caused by error in `[.data.table`:
  ! attempt access index 8/8 in VECTOR_ELT
  ── Error ('test_idle_time.R:135:3'): test idle_time on activitylog for attr 'units' set when arg 'units' = 'auto' ──
  Error in ``[.data.table`(dt, , `:=`(active = cumsum(activate), next_TS = shift(TS, type = "lead")), by = "CID")`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─patients_act %>% idle_time(level = "log", units = "auto") at test_idle_time.R:135:3
   2. ├─edeaR::idle_time(., level = "log", units = "auto")
   3. └─edeaR:::idle_time.activitylog(., level = "log", units = "auto")
   4.   └─edeaR:::idle_time.eventlog(...)
   5.     └─edeaR (local) FUN(log = log, units = units)
   6.       └─edeaR:::idle_time_case(log, units)
   7.         ├─...[]
   8.         └─data.table:::`[.data.table`(...)
  ── Error ('test_idle_time.R:158:3'): test idle_time on grouped_activitylog for attr 'units' set when arg 'units' = 'auto' ──
  <dplyr:::mutate_error/rlang_error/error/condition>
  Error in `mutate(., data = map(data, fun, ...))`: i In argument: `data = map(data, fun, ...)`.
  Caused by error in `map()`:
  i In index: 1.
  Caused by error in `[.data.table`:
  ! attempt access index 8/8 in VECTOR_ELT
  
  [ FAIL 8 | WARN 0 | SKIP 0 | PASS 106 ]
  Error:
  ! Test failures.
  Execution halted