View source: R/modify_abbreviation.R
| modify_abbreviation | R Documentation |
All abbreviations will be coalesced when printing the final table into a single specialized source note.
modify_abbreviation(
x,
abbreviation,
text_interpret = c("md", "html", "none"),
prefix = NULL,
sep1 = NULL,
sep2 = NULL
)
remove_abbreviation(x, abbreviation = NULL)
x |
( |
abbreviation |
( |
text_interpret |
( |
prefix, sep1, sep2 |
(
|
Updated gtsummary object
Footnotes vs Source Notes vs Abbreviations
# Example 1 ----------------------------------
tbl_summary(
trial,
by = trt,
include = age,
type = age ~ "continuous2"
) |>
modify_table_body(~dplyr::mutate(.x, label = sub("Q1, Q3", "IQR", x = label))) |>
modify_abbreviation("IQR = Interquartile Range")
# Example 2 ----------------------------------
lm(marker ~ trt, trial) |>
tbl_regression() |>
remove_abbreviation("CI = Confidence Interval")
# Example 3 ----------------------------------
# add multiple abbreviations at once and customize the prefix and separator
tbl_summary(
trial,
by = trt,
include = age,
type = age ~ "continuous2"
) |>
modify_table_body(~dplyr::mutate(.x, label = sub("Q1, Q3", "IQR", x = label))) |>
modify_abbreviation(
c("IQR = Interquartile Range", "SD = Standard Deviation"),
prefix = c("Key", "Keys"),
sep2 = "; "
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.