style-functions: Set multiple properties on headers

style-functionsR Documentation

Set multiple properties on headers

Description

These functions set arbitrary cell properties on cells in header rows and/or columns.

Usage

style_headers(ht, ...)

style_header_rows(ht, ...)

style_header_cols(ht, ...)

style_cells(ht, row, col, ...)

set_cell_properties(ht, row, col, ...)

Arguments

ht

A huxtable.

...

Named list of cell properties.

row

A row specifier. See rowspecs for details.

col

An optional column specifier.

Details

  • style_headers sets properties on all header cells.

  • style_header_rows sets properties on header rows.

  • style_header_cols sets properties on header columns.

  • style_cells sets properties on all selected cells.

set_cell_properties is a deprecated alias for style_cells. Don't use it.

Examples


style_headers(jams, text_color = "red")
jams <- set_header_cols(jams, 1, TRUE)
style_header_cols(jams,
  text_color = c(NA, "red",
    "darkred", "purple")
  )

style_cells(jams, everywhere, 2, bold = TRUE)

huxtable documentation built on Oct. 2, 2024, 1:06 a.m.