caption: Set the table caption

Description Usage Arguments Details Value See Also Examples

Description

By default, captions are displayed above the table. You can change this with caption_pos().

Usage

1
2
3
caption(ht)
caption(ht) <- value
set_caption(ht, value)

Arguments

ht

A huxtable.

value

A string. Set to NA to reset to the default, which is "NA".

Details

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

Value

caption() returns the caption property. set_caption() returns the modified huxtable.

See Also

Other caption properties: caption_pos(), caption_width()

Examples

1
2
3
4
5
set_caption(jams, "Pots of jam for sale")
# escape caption characters:
caption(jams) <- sanitize(
      "Make $$$ with jam",
      type = "latex")

huxtable documentation built on Feb. 15, 2021, 1:07 a.m.