Running ‘testthat.R’ [13s/17s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > pkg_name <- "maicplus"
  > library(pkg_name, character.only = TRUE)
  > testthat::test_check(pkg_name)
                result               pvalue 
  "-0.17[-0.61; 0.28]"              "0.535" 
  NULL
  NULL
  NULL
  NULL
  Saving _problems/test-plot_km2-27.R
  [ FAIL 1 | WARN 0 | SKIP 16 | PASS 85 ]
  
  ══ Skipped tests (16) ══════════════════════════════════════════════════════════
  • On CRAN (16): 'test-maic_anchored.R:1:1', 'test-maic_anchored.R:69:1',
    'test-maic_unanchored.R:1:1', 'test-maic_unanchored.R:164:1',
    'test-matching.R:192:1', 'test-matching.R:220:1', 'test-matching.R:233:1',
    'test-matching.R:261:1', 'test-plot_km.R:1:1', 'test-plot_km.R:32:1',
    'test-plot_km.R:64:1', 'test-plot_km.R:96:1', 'test-plot_km.R:127:1',
    'test-plot_km.R:167:1', 'test-plot_km.R:206:1', 'test-plot_km.R:235:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-plot_km2.R:11:7'): kmplot2 works ───────────────────────────────
  Error in `kmplot2(weights_object = weighted_twt, tte_ipd = adtte_twt, tte_pseudo_ipd = pseudo_ipd_twt, trt_ipd = "A", trt_agd = "B", trt_common = "C", trt_var_ipd = "ARM", trt_var_agd = "ARM", endpoint_name = "Overall Survival", km_conf_type = "log-log", km_layout = "by_trial", time_scale = "month", break_x_by = 2)`: survminer package is required for this function
  Backtrace:
      ▆
   1. └─vdiffr::expect_doppelganger(...) at test-plot_km2.R:8:3
   2.   └─vdiffr (local) writer(fig, testcase, title)
   3.     ├─vdiffr:::print_plot(plot, title)
   4.     └─vdiffr:::print_plot.function(plot, title)
   5.       └─maicplus (local) p()
   6.         ├─base::suppressWarnings(...) at test-plot_km2.R:11:7
   7.         │ └─base::withCallingHandlers(...)
   8.         └─maicplus::kmplot2(...)
  
  [ FAIL 1 | WARN 0 | SKIP 16 | PASS 85 ]
  Deleting unused snapshots: 'plot_km2/kmplot2-all.svg',
  'plot_km2/kmplot2-by-am.svg', and 'plot_km2/kmplot2-normalize-by-trial.svg'
  Error:
  ! Test failures.
  Execution halted