st_caption: Set table caption

View source: R/table-object.R

st_captionR Documentation

Set table caption

Description

Set table caption

Usage

st_caption(x, text, ...)

Arguments

x

an stobject.

text

caption text to be parsed.

...

additional arguments passed to as.caption(); see details.

Details

A short title for the table can be specified in one of two ways. First, the short title can be specified by including it in brackets (⁠[]⁠) as the first characters in text. Alternatively, short title text can get passed separately into st_caption() under the argument short, which is is eventually handled by as.caption().

By default, as.caption() will repeat the short title at the start of the main caption text. The user can pass repeat_short = FALSE into st_caption() (and eventually to as.caption()) to suppress this behavior.

Examples

tab <- st_new(stdata())
tab <- st_caption(tab, "[Full covariate model estimates]. Run number 101.")
tab$caption

text <- stable(tab)
text


metrumresearchgroup/pmtables documentation built on Dec. 22, 2024, 1:34 a.m.