quarto_tbl_chunk | R Documentation |
Assembles a Quarto knitr table chunk.
quarto_tbl_chunk(
body,
label,
tbl_cap,
tbl_subcap = NULL,
tbl_colwidths = NULL,
tbl_column = "body"
)
body |
R code to insert into the code chunk's body. A character scalar. |
label |
Unique code chunk label. Set as Quarto's |
tbl_cap |
Table caption. Set as Quarto's |
tbl_subcap |
Table subcaptions. Set as Quarto's |
tbl_colwidths |
Apply explicit table column widths for Markdown grid tables and pipe tables that are more than Some formats (e.g. HTML) do an excellent job automatically sizing table columns and so don’t benefit much from column width specifications. Other formats (e.g. LaTeX) require table column sizes in order to correctly flow longer cell content (this is a major reason why tables > 72 columns wide are assigned explicit widths by Pandoc). This can be specified as:
|
tbl_column |
Quarto article layout class for the figure output. Set as
Quarto's
|
Use substitute together with deparse1()
to convert R expressions to a character scalar as expected by param body
:
deparse1(expr = substitute(do_something()), collapse = "\n")
A character scalar.
Other Quarto functions:
quarto_chunks()
,
quarto_fig_chunk()
,
read_quarto_chunk_data()
salim::quarto_tbl_chunk(body = "knitr::kable(head(cars))",
label = "tbl-head-cars",
tbl_cap = "Head of dataset `cars`",
tbl_column = "margin") |>
cat()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.