Hao Zhu | b1bc0aa | 2015-11-12 11:23:42 -0500 | [diff] [blame] | 1 | % Generated by roxygen2: do not edit by hand |
Hao Zhu | a3fc0c4 | 2017-02-27 12:04:59 -0500 | [diff] [blame] | 2 | % Please edit documentation in R/add_footnote.R |
Hao Zhu | b1bc0aa | 2015-11-12 11:23:42 -0500 | [diff] [blame] | 3 | \name{add_footnote} |
| 4 | \alias{add_footnote} |
| 5 | \title{Add footnote} |
| 6 | \usage{ |
Hao Zhu | 1fc48a6 | 2017-03-01 14:07:54 -0500 | [diff] [blame] | 7 | add_footnote(input, label = NULL, notation = "alphabet", |
Hao Zhu | 53e240f | 2017-09-04 20:04:29 -0400 | [diff] [blame] | 8 | threeparttable = FALSE, escape = TRUE) |
Hao Zhu | b1bc0aa | 2015-11-12 11:23:42 -0500 | [diff] [blame] | 9 | } |
| 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 |
| 15 | notations in your notes.} |
| 16 | |
| 17 | \item{notation}{You can select the format of your footnote notation from |
Hao Zhu | 76281fe | 2017-07-03 19:33:09 -0400 | [diff] [blame] | 18 | \code{number}, \code{alphabet} and \code{symbol}.} |
Will Beasley | 70aa3b2 | 2016-01-11 11:42:27 -0600 | [diff] [blame] | 19 | |
Hao Zhu | f7994dd | 2017-02-27 16:58:42 -0500 | [diff] [blame] | 20 | \item{threeparttable}{Boolean value indicating if a |
Hao Zhu | 78e6122 | 2017-05-24 20:53:35 -0400 | [diff] [blame] | 21 | \href{https://www.ctan.org/pkg/threeparttable}{threeparttable} scheme should |
| 22 | be used.} |
Hao Zhu | 53e240f | 2017-09-04 20:04:29 -0400 | [diff] [blame] | 23 | |
| 24 | \item{escape}{Logical value controlling if the label needs to be escaped. |
| 25 | Default is TRUE.} |
Hao Zhu | b1bc0aa | 2015-11-12 11:23:42 -0500 | [diff] [blame] | 26 | } |
| 27 | \description{ |
| 28 | Add footnote to your favorite kable output. So far this function |
| 29 | only works when you define \code{format} in your kable function or in the |
| 30 | global 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 Zhu | 78e6122 | 2017-05-24 20:53:35 -0400 | [diff] [blame] | 34 | \examples{ |
| 35 | x <- knitr::kable(head(mtcars), "html") |
| 36 | add_footnote(x, c("footnote 1", "footnote 2"), notation = "symbol") |
| 37 | |
| 38 | } |