Running ‘test-all.R’ [3s/4s]
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
  > library("testthat")
  > test_check("optiRum")
  Loading required package: optiRum
  ── 1. Error: calcNetIncome on a single household (@test-calcNetIncome.R#35)  ───
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_equal(calcNetIncome(persons, financialYear = taxyear), expected_r) at testthat/test-calcNetIncome.R:35
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: calcNetIncome(persons, financialYear = taxyear)
  5: income[, `:=`(householdChildBenefits = max(childBenefits), householdChildBenefitTax = max(childBenefitTax), 
         childBenefits = 0, childBenefitTax = 0), by = householdID]
  6: `[.data.table`(income, , `:=`(householdChildBenefits = max(childBenefits), householdChildBenefitTax = max(childBenefitTax), 
         childBenefits = 0, childBenefitTax = 0), by = householdID)
  
  ── 2. Error: calcNetIncome on multiple households (@test-calcNetIncome.R#61)  ──
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_equal(calcNetIncome(persons, financialYear = taxyear), expected_r) at testthat/test-calcNetIncome.R:61
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: calcNetIncome(persons, financialYear = taxyear)
  5: income[, `:=`(householdChildBenefits = max(childBenefits), householdChildBenefitTax = max(childBenefitTax), 
         childBenefits = 0, childBenefitTax = 0), by = householdID]
  6: `[.data.table`(income, , `:=`(householdChildBenefits = max(childBenefits), householdChildBenefitTax = max(childBenefitTax), 
         childBenefits = 0, childBenefitTax = 0), by = householdID)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 117 SKIPPED: 14 FAILED: 2
  1. Error: calcNetIncome on a single household (@test-calcNetIncome.R#35) 
  2. Error: calcNetIncome on multiple households (@test-calcNetIncome.R#61) 
  
  Error: testthat unit tests failed
  Execution halted