Add and remove source notes from a table. Source notes are similar to footnotes, expect they are not linked to a cell in the table.
Usage
modify_source_note(x, source_note, text_interpret = c("md", "html"))
remove_source_note(x, source_note_id = NULL)
Arguments
- x
(
gtsummary
)
A gtsummary object.- source_note
(
string
)
A string to add as a source note.- text_interpret
(
string
)
String indicates whether text will be interpreted withgt::md()
orgt::html()
. Must be"md"
(default) or"html"
. Applies to tables printed with{gt}
.- source_note_id
(
integers
)
Integers specifying the ID of the source note to remove. Source notes are indexed sequentially at the time of creation. Default isNULL
, which removes all source notes.
Details
Source notes are not supported by as_kable_extra()
.
Examples
# Example 1 ----------------------------------
tbl <- tbl_summary(trial, include = c(marker, grade), missing = "no") |>
modify_source_note("Results as of June 26, 2015")
# Example 2 ----------------------------------
remove_source_note(tbl, source_note_id = 1)
Characteristic
N = 2001
1 Median (Q1, Q3); n (%)