Create a knitr::kable with a multi-layered (graded) header.

grable(
    data,
    at,
    sep = "_",
    reverse = FALSE,
    format = c("html", "latex"),
    caption = NULL,
    ...
)

Arguments

data

A data.frame.

at

A vector of quoted/unquoted columns, positions, and/or tidyselect::select_helpers. Defaults to all columns.

sep

String to separate the columns. Defaults to "_".

reverse

Should the layers be added in the opposite direction? Defaults to FALSE.

format

Format for rendering the table. Must be "html" (default) or "latex".

caption

Optional caption for the table

...

Arguments to pass to kableExtra::kable_styling

Value

A knitr::kable

Author

Alex Zajichek