Skip to contents

Print a single table from a tablist

Usage

print_tabtibble(x, ...)

# Default S3 method
print_tabtibble(x, caption = NULL, ..., topic_cols = character(0))

Arguments

x

A table to print

...

Passed to the backend's table constructor (knitr::kable() / tinytable::tt() / gt::gt() / flextable::flextable()), or to x's own knit_print() method.

caption

The table's caption, or NULL (the default). Under Quarto, ignored – the crossref wrapper in knit_print.tab_list() applies it instead, so it is not duplicated in the rendered Typst figure. Under R Markdown, applied as the table's own caption (see render_backend_table()); knit_print.tab_list() always supplies it.

topic_cols

Character vector of column names to group into repeating topic headers; only used by the "typst" backend under Quarto (see render_backend_table()).

Value

x, invisibly

Methods (by class)

  • print_tabtibble(default): Print a single table from a tablist using the backend selected by the tabtibble.backend option ("markdown" (default), "tinytable", "gt", "flextable", or "typst"; see render_backend_table()) when x is a plain data.frame. An x that is already a gt, tinytable, flextable, or table1 object (see new_tab_list()) is printed via its own knitr::knit_print() method instead, regardless of tabtibble.backend, so a table the caller built with a specific package is rendered exactly as they built it; under R Markdown (see detect_render_mode()), caption (when supplied) is still shown for it, as a plain bold paragraph before the table, since there is no single API across those packages for adding a caption to an already-built object.