Convert List of Tables to Quarto Tabset
Source:R/crowd_tables_as_tabset.R
crowd_tables_as_tabset.RdCreates a Quarto tabset from a named list of data frames, rendering each
as a table in its own tab. Designed to be called within a
Quarto document code chunk with results='asis'.
Usage
crowd_tables_as_tabset(tbl_list, table_fn = knitr::kable)Arguments
- tbl_list
A named list of data frames. Names become tab labels.
- table_fn
A function that converts a data frame to a printable table object. Defaults to
knitr::kable(). Other options includegt::gt(),tinytable::tt, etc. Can be set globally viaglobal_settings_set(new = list(table_fn = gt::gt), fn_name = "crowd_tables_as_tabset").
Details
This function outputs raw Quarto markdown (level-5 headings) interleaved
with printed tables. The enclosing chunk should use the Quarto
tabset panel layout and results: asis.
See also
crowd_plots_as_tabset() for the plot equivalent.