Running ‘testthat.R’ [26s/25s]
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(webtrackR)
  > 
  > test_check("webtrackR")
  Saving _problems/test-preprocess-4.R
  Saving _problems/test-preprocess-45.R
  Saving _problems/test-preprocess-67.R
  Saving _problems/test-preprocess-74.R
  Saving _problems/test-preprocess-93.R
  Saving _problems/test-preprocess-102.R
  Saving _problems/test-summarize-62.R
  Saving _problems/test-summarize-108.R
  [ FAIL 8 | WARN 30 | SKIP 7 | PASS 124 ]
  
  ══ Skipped tests (7) ═══════════════════════════════════════════════════════════
  • On CRAN (7): 'test-classify.R:22:5', 'test-preprocess.R:23:5',
    'test-preprocess.R:186:5', 'test-preprocess.R:201:5',
    'test-preprocess.R:208:5', 'test-preprocess.R:283:5',
    'test-preprocess.R:291:5'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-preprocess.R:4:5'): add_duration ───────────────────────────────
  Error in ``[.data.table`(wt, , `:=`(duration, as.numeric(data.table::shift(timestamp, n = 1, type = "lead", fill = NA) - timestamp)), by = "panelist_id")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─webtrackR::add_duration(wt, cutoff = 300, replace_by = NA) at test-preprocess.R:4:5
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-preprocess.R:45:5'): add_session ───────────────────────────────
  Error in ``[.data.table`(wt, , `:=`(tmp_index, 1:.N), by = panelist_id)`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─webtrackR::add_session(wt, cutoff = 1800) at test-preprocess.R:45:5
   2.   ├─wt[, `:=`(tmp_index, 1:.N), by = panelist_id]
   3.   └─data.table:::`[.data.table`(wt, , `:=`(tmp_index, 1:.N), by = panelist_id)
  ── Error ('test-preprocess.R:67:5'): add_session testdt_specific ───────────────
  Error in ``[.data.table`(wt, , `:=`(tmp_index, 1:.N), by = panelist_id)`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─webtrackR::add_session(wt, cutoff = 1800) at test-preprocess.R:67:5
   2.   ├─wt[, `:=`(tmp_index, 1:.N), by = panelist_id]
   3.   └─data.table:::`[.data.table`(wt, , `:=`(tmp_index, 1:.N), by = panelist_id)
  ── Error ('test-preprocess.R:74:5'): deduplicate ───────────────────────────────
  Error in ``[.data.table`(wt, , `:=`(duration, as.numeric(data.table::shift(timestamp, n = 1, type = "lead", fill = NA) - timestamp)), by = "panelist_id")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─webtrackR::add_duration(wt, cutoff = 300, replace_by = 300) at test-preprocess.R:74:5
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-preprocess.R:93:5'): deduplicate errors ────────────────────────
  Error in ``[.data.table`(wt, , `:=`(duration, as.numeric(data.table::shift(timestamp, n = 1, type = "lead", fill = NA) - timestamp)), by = "panelist_id")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─webtrackR::add_duration(wt, cutoff = 300, replace_by = 300) at test-preprocess.R:93:5
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-preprocess.R:102:5'): deduplicate testdt_specific ──────────────
  Error in ``[.data.table`(wt, , `:=`(duration, as.numeric(data.table::shift(timestamp, n = 1, type = "lead", fill = NA) - timestamp)), by = "panelist_id")`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─webtrackR::add_duration(wt, cutoff = 300, replace_by = 300) at test-preprocess.R:102:5
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-summarize.R:62:5'): sum_durations ──────────────────────────────
  Error in ``[.data.table`(wt, , `:=`(duration, as.numeric(data.table::shift(timestamp, n = 1, type = "lead", fill = NA) - timestamp)), by = "panelist_id")`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─webtrackR::add_duration(wt) at test-summarize.R:62:5
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-summarize.R:108:5'): sum_durations testdt_specific ─────────────
  Error in ``[.data.table`(wt, , `:=`(duration, as.numeric(data.table::shift(timestamp, n = 1, type = "lead", fill = NA) - timestamp)), by = "panelist_id")`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─webtrackR::add_duration(wt) at test-summarize.R:108:5
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  
  [ FAIL 8 | WARN 30 | SKIP 7 | PASS 124 ]
  Error:
  ! Test failures.
  Execution halted