h_grob_median_surv | R Documentation |
The survival fit is transformed in a grob containing a table with groups in rows characterized by N, median and 95% confidence interval.
h_grob_median_surv(
fit_km,
armval = "All",
x = 0.9,
y = 0.9,
width = grid::unit(0.3, "npc"),
ttheme = gridExtra::ttheme_default()
)
fit_km |
( |
armval |
( |
x |
( |
y |
( |
width |
( |
ttheme |
( |
A grob
of a table containing statistics N
, Median
, and XX% CI
(XX
taken from fit_km
).
library(dplyr)
library(survival)
library(grid)
grid::grid.newpage()
grid.rect(gp = grid::gpar(lty = 1, col = "pink", fill = "gray85", lwd = 1))
tern_ex_adtte %>%
filter(PARAMCD == "OS") %>%
survfit(formula = Surv(AVAL, 1 - CNSR) ~ ARMCD, data = .) %>%
h_grob_median_surv() %>%
grid::grid.draw()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.