huxtable (version 4.6.1)

label: Table label

Description

Functions to get or set the table-level table label property of a huxtable.

Usage

label(ht)
label(ht) <- value
set_label(ht, value)

Arguments

ht

A huxtable.

value

A length-one character vector to be used as a table label in LaTeX, or as an ID for the table in HTML. Set to NA to reset to the default, which is NA.

Value

For label, the label property. For set_label, the modified huxtable.

Details

LaTeX table labels typically start with "tab:".

If you use bookdown, and set a label on your table, the 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.

Examples

Run this code
# NOT RUN {
label(jams) <-  "tab:mytable"
label(jams)

# }

Run the code above in your browser using DataCamp Workspace