Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

header_cols

Mark rows or columns as headers


Description

Arbitrary rows and columns can be headers: they do not have to be at the top or left of the table.

Usage

header_cols(ht)
header_cols(ht) <- value
set_header_cols(ht, col, value)

header_rows(ht)
header_rows(ht) <- value
set_header_rows(ht, row, value)

Arguments

ht

A huxtable.

col

A col specifier. See rowspecs for details.

value

Logical vector. Set to NA to reset to the default, which is FALSE.

row

A row specifier. See rowspecs for details.

Details

By default header rows and columns are not shown differently from other rows, but you can change this with style_headers(). Various themes may set properties on headers. Lastly, headers are treated differently when restacking.

Value

header_cols() returns the header_cols property. set_header_cols() returns the modified huxtable.

Examples

jams <- set_header_rows(jams, 1, TRUE)
jams <- set_header_cols(jams, 1, TRUE)
style_headers(jams,
       bold       = TRUE,
       text_color = "purple"
     )

huxtable

Easily Create and Style Tables for LaTeX, HTML and Other Formats

v5.3.0
MIT + file LICENSE
Authors
David Hugh-Jones [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.