Description Usage Arguments Value Examples
'dt_table_caption()' print the HTML tags of table caption for table generated by package DT, which is a HTML widget that cannot be labeled using table numbering system hence is reference-able. The chunk option ‘result=’asis'' should be **set** when using this function since the HTML tag of caption should be considered as part of the document output.
1 | dt_table_caption(text_ref_str, caption = NA)
|
text_ref_str |
a character that can be **text reference** or **label**, e.g., "(ref:ref-name)" or "ref-name". Note that it **cannot** parse '-' in character. |
caption |
a character ot NA, default NA. The caption of table is the name of **text reference** when it set NA, or you can specify a character as the caption of table instead of it. |
None (invisible 'NULL')
1 2 3 4 5 6 7 8 9 10 11 | # Type one
t1 <- "(ref:text-ref-name)"
dt_table_caption(t1)
# Type two
t2 <- "text-ref-name"
dt_table_caption(t2)
# possible mistakes and the behaviors
t3 <- "ref:text-ref-name"
dt_table_caption(t3)
t4 <- "text_ref_name"
dt_table_caption(t4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.