tests/testthat/test_adjustedcif.method_S3.r

set.seed(42)
sim_dat <- readRDS(system.file("testdata",
                               "d_sim_crisk_n_20.Rds",
                               package="adjustedCurves"))
sim_dat$group <- as.factor(sim_dat$group)

adj <- cif_aalen_johansen(data=sim_dat,
                          variable="group",
                          ev_time="time",
                          event="event",
                          conf_int=FALSE,
                          cause=1)

test_that("print.adjustedcif.method", {
  expect_snapshot_output(print(adj))
})

test_that("summary.adjustedcif.method", {
  expect_snapshot_output(summary(adj))
})
RobinDenz1/adjustedCurves documentation built on Sept. 27, 2024, 7:04 p.m.