# Example 1 ----------------------------------
add_cuminc_ex1 <-
cuminc(Surv(ttdeath, death_cr) ~ 1, trial) |>
tbl_cuminc(times = c(12, 24), label_header = "**Month {time}**") |>
add_nevent() |>
add_n()
add_cuminc_ex1
# Example 2 ----------------------------------
add_cuminc_ex2 <-
cuminc(Surv(ttdeath, death_cr) ~ trt, trial) |>
tbl_cuminc(times = c(12, 24),
outcomes = c("death from cancer", "death other causes"),
label_header = "**Month {time}**") |>
add_p() |>
add_nevent(location = c("label", "level")) |>
add_n(location = c("label", "level"))
add_cuminc_ex2
# inline_text() ------------------------------
inline_text(add_cuminc_ex2, time = 12, level = "Drug A")
inline_text(add_cuminc_ex2, column = p.value)
Run the code above in your browser using DataLab