Skip to contents

The caption is shown as the title above the table. {N} in the text is replaced by the number of observations.

Usage

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

Arguments

x

(ltsummary)
An ltsummary object.

caption

(string)
The caption text. {N} is replaced by the number of observations in the table.

text_interpret

(string)
How the text is interpreted: "md" (the default; the markdown subset **bold**, _italic_ and line breaks), "html" (raw HTML) or "none" (shown verbatim).

Value

An ltsummary object.

Examples

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