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'.
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").- pagebreak
Character. Controls page break insertion between tables:
"never"(default): Never insert page breaks"auto": Insert page breaks for non-HTML/non-Typst formats only"always": Always insert page breaks between tables
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.