Bolds the body cells of chosen rows, with an option to recolor their text and fill their background. Rows are chosen by index or by a filter expression; with neither, every row is bolded.
Usage
gt_bold_rows(
gt_object,
rows = NULL,
text_color = "black",
highlight_color = NULL,
row = NULL,
filter_statement = NULL
)Arguments
- gt_object
A
gttable object to modify.- rows
The rows to bold. Either an expression evaluated against the table's data, such as
mpg > 20, or a numeric vector of row indices. IfNULL, every row is bolded. Defaults toNULL.- text_color
Character. The text color for the bolded rows. Defaults to
"black".- highlight_color
Character. The background fill for the bolded rows. Set to
NULLfor no fill. Defaults toNULL.- row
Deprecated. Use
rows.- filter_statement
Deprecated. Use
rows, which takes the expression directly rather than as a string.
Details
When filter_statement is supplied it is parsed and evaluated against the
table's underlying data, and the rows it matches are bolded. A row vector
takes over when no filter is given. The styling is applied with a single
gt::tab_style() over gt::cells_body(), so it covers every column of the
chosen rows.
