modify_bold_italic {gtsummary} | R Documentation |
Modify Bold and Italic
Description
Add or remove bold and italic styling to a cell in a table. By default, the remove functions will remove all bold/italic styling.
Usage
modify_bold(x, columns, rows)
remove_bold(x, columns = everything(), rows = TRUE)
modify_italic(x, columns, rows)
remove_italic(x, columns = everything(), rows = TRUE)
Arguments
x |
( |
columns |
( For |
rows |
(predicate |
Value
Updated gtsummary object
Examples
# Example 1 ----------------------------------
tbl <- trial |>
tbl_summary(include = grade) |>
modify_bold(columns = label, rows = row_type == "label") |>
modify_italic(columns = label, rows = row_type == "level")
tbl
# Example 2 ----------------------------------
tbl |>
remove_bold(columns = label, rows = row_type == "label") |>
remove_italic(columns = label, rows = row_type == "level")
[Package gtsummary version 2.2.0 Index]