Specify how missing values will be represented in the printed table.
By default, a blank space is printed for all NA
values.
modify_missing_symbol(x, symbol, columns, rows)
(gtsummary
)
A gtsummary object
(string
)
string indicating how missing values are formatted.
(tidy-select
)
columns to add missing symbol.
(predicate expression
)
Predicate expression to select rows in x$table_body
.
Review rows argument details.
Updated gtsummary object
# Use the abbreivation "Ref." for reference rows instead of the em-dash
lm(marker ~ trt, data = trial) |>
tbl_regression() |>
modify_missing_symbol(
symbol = "Ref.",
columns = c(estimate, conf.low, conf.high),
rows = reference_row == TRUE
)
Characteristic
Beta
95% CI
p-value
Abbreviation: CI = Confidence Interval