huxtable (version 0.3.1)

caption: Caption

Description

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

Usage

caption(ht)
caption(ht) <- value
set_caption(ht, value)

Arguments

ht

A huxtable.

value

A length-one character vector. Set to NA for no caption.

Value

For caption, the caption attribute. For set_caption, the ht object.

Details

Captions are not escaped. See the example for a workaround.

See Also

caption_pos

Examples

Run this code
# NOT RUN {
ht <- huxtable(a = 1:3, b = 1:3)
caption(ht) <-  'An example table'
caption(ht)
print_screen(ht, blank = '.')
ht <- hux(a = 1:2, b = 1:2)
caption(ht) <- xtable::sanitize('Make $$$ with us', type = 'latex') # escape caption characters
# }

Run the code above in your browser using DataCamp Workspace