Learn R Programming

kableExtra (version 0.3.0)

add_footnote: Add footnote

Description

Add footnote to your favorite kable output. So far this function only works when you define format in your kable function or in the global knitr option knitr.table.format. In latex, we are using the threeparttable package so you need to import this package in your YAML header.

Usage

add_footnote(input, label = NULL, notation = "alphabet",
  threeparttable = FALSE)

Arguments

input

The direct output of your kable function or your last kableExtra function.

label

A vector of footnotes you want to add. You don't need to add notations in your notes.

notation

You can select the format of your footnote notation from number, alphabet and symbol.

threeparttable

Boolean value indicating if a threeparttable scheme should be used.

Examples

Run this code
# NOT RUN {
x <- knitr::kable(head(mtcars), "html")
add_footnote(x, c("footnote 1", "footnote 2"), notation = "symbol")

# }

Run the code above in your browser using DataLab