Hao Zhu | 1ac13ad | 2018-01-08 16:12:24 -0500 | [diff] [blame] | 1 | % Generated by roxygen2: do not edit by hand |
| 2 | % Please edit documentation in R/footnote_marker.R |
| 3 | \name{footnote_marker_number} |
| 4 | \alias{footnote_marker_number} |
Hao Zhu | e0782ab | 2018-01-09 13:24:13 -0500 | [diff] [blame] | 5 | \alias{footnote_marker_alphabet} |
| 6 | \alias{footnote_marker_symbol} |
Hao Zhu | 1ac13ad | 2018-01-08 16:12:24 -0500 | [diff] [blame] | 7 | \title{Footnote marker} |
| 8 | \usage{ |
Hao Zhu | f94a26f | 2018-04-05 17:42:55 -0400 | [diff] [blame] | 9 | footnote_marker_number(x, format, double_escape = FALSE) |
Hao Zhu | e0782ab | 2018-01-09 13:24:13 -0500 | [diff] [blame] | 10 | |
Hao Zhu | f94a26f | 2018-04-05 17:42:55 -0400 | [diff] [blame] | 11 | footnote_marker_alphabet(x, format, double_escape = FALSE) |
Hao Zhu | e0782ab | 2018-01-09 13:24:13 -0500 | [diff] [blame] | 12 | |
Hao Zhu | f94a26f | 2018-04-05 17:42:55 -0400 | [diff] [blame] | 13 | footnote_marker_symbol(x, format, double_escape = FALSE) |
Hao Zhu | e0782ab | 2018-01-09 13:24:13 -0500 | [diff] [blame] | 14 | } |
| 15 | \arguments{ |
| 16 | \item{x}{a number. For example, for \code{footnote_marker_alphabet(2)} will |
| 17 | return "b" in HTML.} |
| 18 | |
| 19 | \item{format}{Either \code{html} or \code{latex}. All functions here can read |
| 20 | default value from global option \code{knitr.table.format}.} |
Hao Zhu | f94a26f | 2018-04-05 17:42:55 -0400 | [diff] [blame] | 21 | |
| 22 | \item{double_escape}{T/F if output is in LaTeX, whether it should be double |
Hao Zhu | 270846b | 2019-01-06 17:52:26 -0500 | [diff] [blame] | 23 | escaped. If you are using footnote_marker in \code{group_rows`` labeling row or }add_header_above\code{, you need to set this to be }TRUE`.} |
Hao Zhu | 1ac13ad | 2018-01-08 16:12:24 -0500 | [diff] [blame] | 24 | } |
| 25 | \description{ |
Hao Zhu | e0782ab | 2018-01-09 13:24:13 -0500 | [diff] [blame] | 26 | Put footnote mark in superscription in table. Unless you are |
| 27 | using it in the \code{caption} of \code{kable}, you will need to put \code{escape = F} |
| 28 | in \code{kable} (similar with \code{cell_spec}). Again, similar with \code{cell_spec}, the |
| 29 | \code{format} option here can read default value from global option |
| 30 | \code{knitr.table.format}. |
Hao Zhu | 1ac13ad | 2018-01-08 16:12:24 -0500 | [diff] [blame] | 31 | } |
Hao Zhu | 593f57e | 2018-01-09 13:30:01 -0500 | [diff] [blame] | 32 | \examples{ |
Hao Zhu | b1e2e3d | 2018-01-09 13:31:42 -0500 | [diff] [blame] | 33 | dt <- mtcars[1:5, 1:5] |
Hao Zhu | 593f57e | 2018-01-09 13:30:01 -0500 | [diff] [blame] | 34 | colnames(dt)[1] <- paste0("mpg", footnote_marker_alphabet(2, "html")) |
| 35 | rownames(dt)[2] <- paste0(rownames(dt)[2], footnote_marker_alphabet(1, "html")) |
| 36 | footnote(knitr::kable(dt, "html"), alphabet = c("Note a", "Note b")) |
| 37 | |
| 38 | } |