footnote
provides a more flexible way to add footnote. You
can add mutiple sets of footnote using differeny notation system. It is
also possible to specify footnote section header one by one and print
footnotes as a chunk of texts.
footnote(kable_input, general = NULL, number = NULL, alphabet = NULL,
symbol = NULL, footnote_order = c("general", "number", "alphabet",
"symbol"), footnote_as_chunk = FALSE, escape = TRUE,
threeparttable = FALSE, general_title = "Note: ", number_title = "",
alphabet_title = "", symbol_title = "")
HTML or LaTeX table generated by knitr::kable
Text for general footnote comments. Footnotes in this section won't be labeled with any notations
A vector of footnote texts. Footnotes here will be numbered. There is no upper cap for the number of footnotes here
A vector of footnote texts, Footnotes here will be labeled with abc. The vector here should not have more than 26 elements.
A vector of footnote texts, Footnotes here will be labeled with special symbols. The vector here should not have more than 20 elements.
The order of how to arrange general
, number
,
alphabet
and symbol
.
T/F value. Default is FALSE. It controls whether the footnotes should be printed in a chunk (without line break).
T/F value. It controls whether the contents and titles should be escaped against HTML or LaTeX. Default is TRUE.
T/F value for whether to use LaTeX package threeparttable. Threeparttable will force the width of caption and footnotes be the width of the original table. It's useful when you have long paragraph of footnotes.
Section header for general footnotes. Default is "Note: ".
Section header for number footnotes. Default is "".
Section header for alphabet footnotes. Default is "".
Section header for symbol footnotes. Default is "".
# NOT RUN {
dt <- mtcars[1:5, 1:5]
footnote(knitr::kable(dt, "html"), alphabet = c("Note a", "Note b"))
# }
Run the code above in your browser using DataLab