modify_post_fmt_fun {gtsummary} | R Documentation |
Modify post formatting
Description
Apply a formatting function after the primary formatting functions have been applied.
The function is similar to gt::text_transform()
.
Usage
modify_post_fmt_fun(x, fmt_fun, columns, rows = TRUE)
Arguments
x |
( |
fmt_fun |
( |
columns |
( |
rows |
(predicate |
Value
Updated gtsummary object
Examples
# Example 1 ----------------------------------
data.frame(x = FALSE) |>
tbl_summary(type = x ~ "categorical") |>
modify_post_fmt_fun(
fmt_fun = ~ifelse(. == "0 (0%)", "0", .),
columns = all_stat_cols()
)
[Package gtsummary version 2.3.0 Index]