Running ‘testthat.R’ [4s/14s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(hesim)
  > 
  > test_check("hesim")
  ── 1. Error: icea (@test-cea.R#102)  ───────────────────────────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: icea(ce, k = krange, sim = "sim", strategy = "strategy", grp = "grp", e = "qalys", 
         c = "cost") at testthat/test-cea.R:102
  2: nmb_summary(x, k, sim, strategy, grp, e, c)
  3: x2[, list(e_mean = mean(e), c_mean = mean(c), e_lower = stats::quantile(e, 0.025), 
         e_upper = stats::quantile(e, 0.975), c_lower = stats::quantile(c, 0.025), c_upper = stats::quantile(c, 
             0.975)), by = c(strategy, grp)]
  4: `[.data.table`(x2, , list(e_mean = mean(e), c_mean = mean(c), e_lower = stats::quantile(e, 
         0.025), e_upper = stats::quantile(e, 0.975), c_lower = stats::quantile(c, 0.025), 
         c_upper = stats::quantile(c, 0.975)), by = c(strategy, grp))
  
  ── 2. Error: icea_pw (@test-cea.R#154)  ────────────────────────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: icea_pw(ce, k = krange, comparator = "Strategy 1", sim = "sim", strategy = "strategy", 
         e = "qalys", c = "cost") at testthat/test-cea.R:154
  2: inmb_summary(delta, k, sim, strategy, grp, e = "ie", c = "ic")
  3: nmb_summary(ix, k, sim, strategy, grp, e, c)
  4: x2[, list(e_mean = mean(e), c_mean = mean(c), e_lower = stats::quantile(e, 0.025), 
         e_upper = stats::quantile(e, 0.975), c_lower = stats::quantile(c, 0.025), c_upper = stats::quantile(c, 
             0.975)), by = c(strategy, grp)]
  5: `[.data.table`(x2, , list(e_mean = mean(e), c_mean = mean(c), e_lower = stats::quantile(e, 
         0.025), e_upper = stats::quantile(e, 0.975), c_lower = stats::quantile(c, 0.025), 
         c_upper = stats::quantile(c, 0.975)), by = c(strategy, grp))
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 21 SKIPPED: 0 FAILED: 2
  1. Error: icea (@test-cea.R#102) 
  2. Error: icea_pw (@test-cea.R#154) 
  
  Error: testthat unit tests failed
  Execution halted