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{ |
| 9 | footnote_marker_number(x, format) |
Hao Zhu | e0782ab | 2018-01-09 13:24:13 -0500 | [diff] [blame] | 10 | |
| 11 | footnote_marker_alphabet(x, format) |
| 12 | |
| 13 | footnote_marker_symbol(x, format) |
| 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 | 1ac13ad | 2018-01-08 16:12:24 -0500 | [diff] [blame] | 21 | } |
| 22 | \description{ |
Hao Zhu | e0782ab | 2018-01-09 13:24:13 -0500 | [diff] [blame] | 23 | Put footnote mark in superscription in table. Unless you are |
| 24 | using it in the \code{caption} of \code{kable}, you will need to put \code{escape = F} |
| 25 | in \code{kable} (similar with \code{cell_spec}). Again, similar with \code{cell_spec}, the |
| 26 | \code{format} option here can read default value from global option |
| 27 | \code{knitr.table.format}. |
Hao Zhu | 1ac13ad | 2018-01-08 16:12:24 -0500 | [diff] [blame] | 28 | } |
Hao Zhu | 593f57e | 2018-01-09 13:30:01 -0500 | [diff] [blame] | 29 | \examples{ |
Hao Zhu | b1e2e3d | 2018-01-09 13:31:42 -0500 | [diff] [blame] | 30 | dt <- mtcars[1:5, 1:5] |
Hao Zhu | 593f57e | 2018-01-09 13:30:01 -0500 | [diff] [blame] | 31 | colnames(dt)[1] <- paste0("mpg", footnote_marker_alphabet(2, "html")) |
| 32 | rownames(dt)[2] <- paste0(rownames(dt)[2], footnote_marker_alphabet(1, "html")) |
| 33 | footnote(knitr::kable(dt, "html"), alphabet = c("Note a", "Note b")) |
| 34 | |
| 35 | } |