Running ‘testthat.R’ [18s/25s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(jstable)
  > 
  > test_check("jstable")
  ── 1. Error: Run CreateOneTableJS (@test-CreateTableOneJS.R#9)  ────────────────
  argument "X" is missing, with no default
  Backtrace:
   1. testthat::expect_is(...)
   4. jstable::CreateTableOneJS(vars = names(lung), data = lung)
   6. tableone:::print.TableOne(...)
   7. tableone:::ModuleNSpacesToAdd(FmtElementTables)
   8. base::sweep(...)
  
  Independent Sampling design (with replacement)
  svydesign(id = ~1, data = lung)
  Independent Sampling design (with replacement)
  svydesign(id = ~1, data = lung)
  Independent Sampling design (with replacement)
  svydesign(id = ~1, data = lung)
  Independent Sampling design (with replacement)
  subset(data, get(var_subgroup) == .)
  Independent Sampling design (with replacement)
  subset(data, get(var_subgroup) == .)
  Independent Sampling design (with replacement)
  svydesign(id = ~1, data = lung)
  Independent Sampling design (with replacement)
  subset(data, get(var_subgroup) == .)
  Independent Sampling design (with replacement)
  svydesign(id = ~1, data = lung)
  Independent Sampling design (with replacement)
  svydesign(id = ~1, data = lung)
  Independent Sampling design (with replacement)
  subset(data, get(var_subgroup) == .)
  Independent Sampling design (with replacement)
  subset(data, get(var_subgroup) == .)
  Independent Sampling design (with replacement)
  svydesign(id = ~1, data = lung)
  Independent Sampling design (with replacement)
  subset(data, get(var_subgroup) == .)
  Stratified Independent Sampling design (with replacement)
  dpbc <- survey::svydesign(id=~1, prob=~randprob, strata=~edema, data=subset(pbc,randomized))
  Stratified Independent Sampling design (with replacement)
  dpbc <- survey::svydesign(id=~1, prob=~randprob, strata=~edema, data=subset(pbc,randomized))
  Stratified Independent Sampling design (with replacement)
  dpbc <- survey::svydesign(id=~1, prob=~randprob, strata=~edema, data=subset(pbc,randomized))
  Stratified Independent Sampling design (with replacement)
  dpbc <- survey::svydesign(id=~1, prob=~randprob, strata=~edema, data=subset(pbc,randomized))
  Stratified Independent Sampling design (with replacement)
  dpbc <- survey::svydesign(id=~1, prob=~randprob, strata=~edema, data=subset(pbc,randomized))
  ── 2. Error: Run SvyCreateOneTableJS (@test-svyCreateTableOne.R#10)  ───────────
  argument "X" is missing, with no default
  Backtrace:
   1. testthat::expect_is(...)
   4. jstable::svyCreateTableOneJS(...)
   6. tableone:::print.TableOne(...)
   7. tableone:::ModuleNSpacesToAdd(FmtElementTables)
   8. base::sweep(...)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 36 | SKIPPED: 0 | WARNINGS: 4 | FAILED: 2 ]
  1. Error: Run CreateOneTableJS (@test-CreateTableOneJS.R#9) 
  2. Error: Run SvyCreateOneTableJS (@test-svyCreateTableOne.R#10) 
  
  Error: testthat unit tests failed
  Execution halted