Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(rcbalance)
  Loading required package: MASS
  Loading required package: plyr
  optmatch (>= 0.9-1) needed to run the rcbalance command.  Please load optmatch and agree to its academic license before calling rcbalance.
  > 
  > test_check("rcbalance")
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-dist2net.R:13:1): (code run outside of `test_that()`) ───────────
  Error in `build.dist.struct(z = nuclearplants$pr, X = subset(nuclearplants[c("date", 
      "t1", "t2", "cap", "bw", "ne", "cum.n")]), exact = nuclearplants$cap)`: Length of z does not match row count in X
  Backtrace:
      █
   1. └─rcbalance::build.dist.struct(...) test-dist2net.R:13:0
  ── Error (test-exclude_treated.R:11:1): (code run outside of `test_that()`) ────
  Error in `build.dist.struct(z = nuclearplants$pr, X = subset(nuclearplants[c("date", 
      "t1", "t2", "cap", "bw", "ne")]), exact = nuclearplants$cum.n, 
      calip.option = "none")`: Length of z does not match row count in X
  Backtrace:
      █
   1. └─rcbalance::build.dist.struct(...) test-exclude_treated.R:11:0
  ── Error (test-penalty.R:11:1): (code run outside of `test_that()`) ────────────
  Error in `build.dist.struct(z = nuclearplants$pr, X = subset(nuclearplants[c("date", 
      "t1", "t2", "cap", "bw", "cum.n")]), exact = nuclearplants$ne, 
      calip.option = "none")`: Length of z does not match row count in X
  Backtrace:
      █
   1. └─rcbalance::build.dist.struct(...) test-penalty.R:11:0
  ── Error (test-precision.R:12:1): (code run outside of `test_that()`) ──────────
  Error in `build.dist.struct(z = nuclearplants$pr, X = subset(nuclearplants[c("date", 
      "t1", "t2", "cap", "cum.n")]), exact = nuclearplants$ne, 
      calip.option = "none")`: Length of z does not match row count in X
  Backtrace:
      █
   1. └─rcbalance::build.dist.struct(...) test-precision.R:12:0
  
  [ FAIL 4 | WARN 0 | SKIP 0 | PASS 1 ]
  Error: Test failures
  Execution halted