h_grob_coxph | R Documentation |
Grob of rtable
output from h_tbl_coxph_pairwise()
h_grob_coxph(
...,
x = 0,
y = 0,
width = grid::unit(0.4, "npc"),
ttheme = gridExtra::ttheme_default(padding = grid::unit(c(1, 0.5), "lines"), core =
list(bg_params = list(fill = c("grey95", "grey90"), alpha = 0.5)))
)
... |
arguments to pass to |
x |
( |
y |
( |
width |
( |
ttheme |
( |
A grob
of a table containing statistics HR
, XX% CI
(XX
taken from control_coxph_pw
),
and p-value (log-rank)
.
library(dplyr)
library(survival)
library(grid)
grid::grid.newpage()
grid.rect(gp = grid::gpar(lty = 1, col = "pink", fill = "gray85", lwd = 1))
data <- tern_ex_adtte %>%
filter(PARAMCD == "OS") %>%
mutate(is_event = CNSR == 0)
tbl_grob <- h_grob_coxph(
df = data,
variables = list(tte = "AVAL", is_event = "is_event", arm = "ARMCD"),
control_coxph_pw = control_coxph(conf_level = 0.9), x = 0.5, y = 0.5
)
grid::grid.draw(tbl_grob)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.