Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

caption

Set the table caption


Description

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

Usage

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

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

huxtable

Easily Create and Style Tables for LaTeX, HTML and Other Formats

v5.3.0
MIT + file LICENSE
Authors
David Hugh-Jones [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.