Running ‘testthat.R’ [7s/13s]
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(hicp)
  
  Attaching package: 'hicp'
  
  The following object is masked from 'package:stats':
  
      aggregate
  
  The following object is masked from 'package:utils':
  
      data
  
  > 
  > test_check("hicp")
  Saving _problems/test_chaining-841.R
  Saving _problems/test_index.aggregation-253.R
  Saving _problems/test_rates-306.R
  [ FAIL 3 | WARN 0 | SKIP 0 | PASS 455 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_chaining.R:841:1'): (code run outside of `test_that()`) ────────
  Error in ``[.data.table`(dtcomp, , `:=`("dec_ratio", unchain(x = index, t = time)), by = "coicop")`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─dtcomp[, `:=`("dec_ratio", unchain(x = index, t = time)), by = "coicop"] at test_chaining.R:841:1
   2. └─data.table:::`[.data.table`(...) at test_chaining.R:841:1
  ── Error ('test_index.aggregation.r:253:1'): (code run outside of `test_that()`) ──
  Error in ``[.data.table`(dtm, , `:=`("dec_ratio", unchain(x = index, t = time)), by = "coicop")`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─dtm[, `:=`("dec_ratio", unchain(x = index, t = time)), by = "coicop"] at test_index.aggregation.r:253:1
   2. └─data.table:::`[.data.table`(...) at test_index.aggregation.r:253:1
  ── Error ('test_rates.r:306:1'): (code run outside of `test_that()`) ───────────
  Error in ``[.data.table`(dt, , `:=`("weight", runif(n = 1, min = 1, max = 30)), by = list(year(time), coicop))`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─...[] at test_rates.r:306:1
   2. └─data.table:::`[.data.table`(...) at test_rates.r:306:1
  
  [ FAIL 3 | WARN 0 | SKIP 0 | PASS 455 ]
  Error:
  ! Test failures.
  Execution halted