Captions are assigned based on output type.
gt::gt(caption=)
flextable::set_caption(caption=)
huxtable::set_caption(value=)
knitr::kable(caption=)
modify_caption(x, caption, text_interpret = c("md", "html"))
(gtsummary
)
A gtsummary object
(string
)
A string for the table caption/title
(string
)
String indicates whether text will be interpreted with
gt::md()
or gt::html()
. Must be "md"
(default) or "html"
.
Updated gtsummary object
trial |>
tbl_summary(by = trt, include = c(marker, stage)) |>
modify_caption(caption = "**Baseline Characteristics** N = {N}")
Baseline Characteristics N = 200
Characteristic
Drug A
N = 981
Drug B
N = 1021
1 Median (Q1, Q3); n (%)