Running ‘testthat.R’ [13s/10s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(surveysd)
  > 
  > 
  > test_check("surveysd")
  Saving _problems/test_calcstError-11.R
  Saving _problems/test_drawbootstrap-10.R
  Saving _problems/test_generateHHID-10.R
  Saving _problems/test_ipf-4.R
  Saving _problems/test_plot-11.R
  Saving _problems/test_recalib-10.R
  Saving _problems/test_rescaledbootstrap-12.R
  [ FAIL 7 | WARN 0 | SKIP 1 | PASS 0 ]
  
  ══ Skipped tests (1) ═══════════════════════════════════════════════════════════
  • empty test (1):
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_calcstError.R:11:1'): (code run outside of `test_that()`) ──────
  Error in ``[.data.table`(eusilc, , `:=`(povmd60, as.numeric(eqIncome < 0.6 * laeken::weightedMedian(eqIncome, w = db090))), by = year)`: attempt access index 29/29 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─surveysd:::demo.eusilc() at test_calcstError.R:11:1
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test_drawbootstrap.R:10:1'): (code run outside of `test_that()`) ────
  Error in ``[.data.table`(eusilc, , `:=`(povmd60, as.numeric(eqIncome < 0.6 * laeken::weightedMedian(eqIncome, w = db090))), by = year)`: attempt access index 29/29 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─surveysd:::demo.eusilc(n = 3) at test_drawbootstrap.R:10:1
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test_generateHHID.R:10:1'): (code run outside of `test_that()`) ─────
  Error in ``[.data.table`(eusilc, , `:=`(povmd60, as.numeric(eqIncome < 0.6 * laeken::weightedMedian(eqIncome, w = db090))), by = year)`: attempt access index 29/29 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─surveysd:::demo.eusilc() at test_generateHHID.R:10:1
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test_ipf.R:4:1'): (code run outside of `test_that()`) ───────────────
  Error in ``[.data.table`(eusilc, , `:=`(povmd60, as.numeric(eqIncome < 0.6 * laeken::weightedMedian(eqIncome, w = db090))), by = year)`: attempt access index 29/29 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─surveysd::demo.eusilc(n = 1, prettyNames = TRUE) at test_ipf.R:4:1
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test_plot.R:11:1'): (code run outside of `test_that()`) ─────────────
  Error in ``[.data.table`(eusilc, , `:=`(povmd60, as.numeric(eqIncome < 0.6 * laeken::weightedMedian(eqIncome, w = db090))), by = year)`: attempt access index 29/29 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─surveysd:::demo.eusilc() at test_plot.R:11:1
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test_recalib.R:10:1'): (code run outside of `test_that()`) ──────────
  Error in ``[.data.table`(eusilc, , `:=`(povmd60, as.numeric(eqIncome < 0.6 * laeken::weightedMedian(eqIncome, w = db090))), by = year)`: attempt access index 29/29 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─surveysd:::demo.eusilc(n = 4) at test_recalib.R:10:1
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test_rescaledbootstrap.R:12:1'): (code run outside of `test_that()`) ──
  Error in ``[.data.table`(eusilc, , `:=`(N.households, sum(db090[!duplicated(db030)])), by = db040)`: attempt access index 28/28 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─...[] at test_rescaledbootstrap.R:12:1
   2. └─data.table:::`[.data.table`(...) at test_rescaledbootstrap.R:12:1
  
  [ FAIL 7 | WARN 0 | SKIP 1 | PASS 0 ]
  Error:
  ! Test failures.
  Execution halted