View source: R/properties-table.R
| label | R Documentation |
The label is used as the table's label in LaTeX, and as the "id" property of the table element in HTML.
label(ht)
label(ht) <- value
set_label(ht, value)
ht |
A huxtable. |
value |
A string. Set to |
LaTeX table labels typically start with "tab:".
Within knitr, huxtable labels default to the knitr chunk label. If a chunk
prints more than one huxtable, later labels have "-2", "-3" and so on
appended to make them unique. To turn off this behaviour, set
options(huxtable.autolabel = FALSE).
If you use bookdown, and set a label on your
table, the table caption() will automatically be prefixed with (#label).
You can then refer to the table using @ref(label). label needs to start
with "tab:"; if it doesn't, the "tab:" prefix will be added
automatically. To turn off this behaviour, set
options(huxtable.bookdown = FALSE).
Quarto table labels override labels set by this mechanism. A warning is issued if both are set.
property() returns the property value(s).
set_property() and map_property() return the modified huxtable.
huxtable-options
set_label(jams, "tab:mytable")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.