blob: c46cf0d1763863cbbeb9e953c0f7fad5521dcaa5 [file] [log] [blame]
Hao Zhub1bc0aa2015-11-12 11:23:42 -05001% Generated by roxygen2: do not edit by hand
Hao Zhua3fc0c42017-02-27 12:04:59 -05002% Please edit documentation in R/add_footnote.R
Hao Zhub1bc0aa2015-11-12 11:23:42 -05003\name{add_footnote}
4\alias{add_footnote}
5\title{Add footnote}
6\usage{
Hao Zhu1fc48a62017-03-01 14:07:54 -05007add_footnote(input, label = NULL, notation = "alphabet",
Hao Zhu53e240f2017-09-04 20:04:29 -04008 threeparttable = FALSE, escape = TRUE)
Hao Zhub1bc0aa2015-11-12 11:23:42 -05009}
10\arguments{
11\item{input}{The direct output of your \code{kable} function or your last
12\code{kableExtra} function.}
13
14\item{label}{A vector of footnotes you want to add. You don't need to add
15notations in your notes.}
16
17\item{notation}{You can select the format of your footnote notation from
Hao Zhu76281fe2017-07-03 19:33:09 -040018\code{number}, \code{alphabet} and \code{symbol}.}
Will Beasley70aa3b22016-01-11 11:42:27 -060019
Hao Zhuf7994dd2017-02-27 16:58:42 -050020\item{threeparttable}{Boolean value indicating if a
Hao Zhu78e61222017-05-24 20:53:35 -040021\href{https://www.ctan.org/pkg/threeparttable}{threeparttable} scheme should
22be used.}
Hao Zhu53e240f2017-09-04 20:04:29 -040023
24\item{escape}{Logical value controlling if the label needs to be escaped.
25Default is TRUE.}
Hao Zhub1bc0aa2015-11-12 11:23:42 -050026}
27\description{
28Add footnote to your favorite kable output. So far this function
29only works when you define \code{format} in your kable function or in the
30global knitr option \code{knitr.table.format}. In latex, we are using the
31\code{threeparttable} package so you need to import this package in your
32\code{YAML} header.
33}
Hao Zhu78e61222017-05-24 20:53:35 -040034\examples{
35x <- knitr::kable(head(mtcars), "html")
36add_footnote(x, c("footnote 1", "footnote 2"), notation = "symbol")
37
38}