column_to_header {huxtable} | R Documentation |
Convert a column to header rows
Description
Convert a column to header rows
Usage
column_to_header(
ht,
col,
...,
glue = "{value}",
start_col = 1,
ignore_headers = TRUE,
set_headers = TRUE
)
Arguments
ht |
A huxtable. |
col |
A column specifier for a single column. |
... |
Properties to set on new rows |
glue |
Glue string. |
start_col |
Integer. New header text will start at this column. |
ignore_headers |
Logical. Ignore existing headers? |
set_headers |
Logical. Set new rows as headers? |
Examples
column_to_header(jams, "Type")
column_to_header(jams, "Type", text_color = "red")
column_to_header(jams, "Price",
number_format = 2,
italic = TRUE,
glue = "Price: {value}")
iris_hux <- as_hux(iris[c(1:4, 51:54, 101:104), ])
column_to_header(iris_hux, "Species",
markdown = TRUE,
glue = "Species: **{value}**"
)
[Package huxtable version 5.5.6 Index]