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

footnote_marker_number

Footnote marker


Description

Put footnote mark in superscription in table. Unless you are using it in the caption of kable, you will need to put escape = F in kable (similar with cell_spec). Again, similar with cell_spec, the format option here can read default value from global option knitr.table.format.

Usage

footnote_marker_number(x, format, double_escape = FALSE)

footnote_marker_alphabet(x, format, double_escape = FALSE)

footnote_marker_symbol(x, format, double_escape = FALSE)

Arguments

x

a number. For example, for footnote_marker_alphabet(2) will return "b" in HTML.

format

Either html or latex. All functions here can read default value from global option knitr.table.format.

double_escape

T/F if output is in LaTeX, whether it should be double escaped. If you are using footnote_marker in group_rows`` labeling row or add_header_above, you need to set this to be TRUE'.

Examples

## Not run: 
dt <- mtcars[1:5, 1:5]
colnames(dt)[1] <- paste0("mpg", footnote_marker_alphabet(2, "html"))
rownames(dt)[2] <- paste0(rownames(dt)[2], footnote_marker_alphabet(1, "html"))
footnote(knitr::kable(dt, "html"), alphabet = c("Note a", "Note b"))

## End(Not run)

kableExtra

Construct Complex Table with 'kable' and Pipe Syntax

v1.3.4
MIT + file LICENSE
Authors
Hao Zhu [aut, cre] (<https://orcid.org/0000-0002-3386-6076>), Thomas Travison [ctb], Timothy Tsai [ctb], Will Beasley [ctb], Yihui Xie [ctb], GuangChuang Yu [ctb], Stéphane Laurent [ctb], Rob Shepherd [ctb], Yoni Sidi [ctb], Brian Salzer [ctb], George Gui [ctb], Yeliang Fan [ctb], Duncan Murdoch [ctb], Bill Evans [ctb]
Initial release

We don't support your browser anymore

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