Skip to contents

gt_bold_rows applies bold styling to rows of a GT table. You can specify rows to bold through a filter statement or by default, all rows are bolded. There is also an option to change the text color and add a background highlight color to the bolded rows.

Usage

gt_bold_rows(
  gt_object,
  row = NULL,
  text_color = "black",
  highlight_color = NULL,
  filter_statement = NULL
)

Arguments

gt_object

A GT table object.

row

A vector of row indices to bold, default is all rows.

text_color

The color to be used for the text, default is 'black'.

highlight_color

The color to be used for the row background highlight, default is 'white'. If NULL, no background color will be applied.

filter_statement

A character string that contains a filter expression which is evaluated to determine which rows to bold. It should be a valid R expression as a string, for example, "column_name > 5". Default is NULL, which means no filter is applied.

Value

A GT table object with the specified rows styled in bold text, and optionally with changed text color and background highlight.