modify_caption: Modify table caption

View source: R/modify_caption.R

modify_captionR Documentation

Modify table caption

Description

Captions are assigned based on output type.

  • gt::gt(caption=)

  • flextable::set_caption(caption=)

  • huxtable::set_caption(value=)

  • knitr::kable(caption=)

Usage

modify_caption(x, caption, text_interpret = c("md", "html"))

Arguments

x

(gtsummary)
A gtsummary object

caption

(string)
A string for the table caption/title

text_interpret

(string)
String indicates whether text will be interpreted with gt::md() or gt::html(). Must be "md" (default) or "html".

Value

Updated gtsummary object

Examples

trial |>
  tbl_summary(by = trt, include = c(marker, stage)) |>
  modify_caption(caption = "**Baseline Characteristics** N = {N}")

gtsummary documentation built on Oct. 5, 2024, 1:06 a.m.