By default, captions are displayed above the table. You can change this
with caption_pos()
.
caption(ht)
caption(ht) <- value
set_caption(ht, value)
A huxtable.
A string. Set to NA
to reset to the default, which is
"NA"
.
caption()
returns the caption
property.
set_caption()
returns the modified huxtable.
Captions are not escaped. See the example for a workaround.
Other caption properties:
caption_pos()
,
caption_width()
set_caption(jams, "Pots of jam for sale")
#> Pots of jam for sale
#> Type Price Sugar content
#> Strawberry 1.90 40.00%
#> Raspberry 2.10 35.00%
#> Plum 1.80 50.00%
#>
#> Column names: Type, Price, Sugar
# escape caption characters:
caption(jams) <- sanitize(
"Make $$$ with jam",
type = "latex")