
Functions to get or set the table-level caption property of a huxtable.
caption(ht)
caption(ht) <- value
set_caption(ht, value)
A huxtable.
A length-one character vector. Set to NA
for no caption.
For caption
, the caption
attribute.
For set_caption
, the ht
object.
Captions are not escaped. See the example for a workaround.
# NOT RUN {
ht <- huxtable(a = 1:3, b = 1:3)
caption(ht) <- 'An example table'
caption(ht)
print_screen(ht)
ht <- hux(a = 1:2, b = 1:2)
caption(ht) <- sanitize('Make $$$ with us', type = 'latex') # escape caption characters
# }
Run the code above in your browser using DataLab