R: Table label

label {huxtable} | R Documentation

## 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`.

### Details

LaTeX table labels typically start with "tab:", and they must do so if you want table numbering in bookdown.

### Value

For `label`, the `label` property. For `set_label`, the `ht` object.

### Examples

    ht <- huxtable(a = 1:3, b = 1:3)
    label(ht) <-  'tab:mytable'
    label(ht)

[Package huxtable version 4.2.0 Index]