blob: fece9f79984b0444bcf63d04ce588ac7e5af67a3 [file] [log] [blame]
Hao Zhu1ac13ad2018-01-08 16:12:24 -05001% 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 Zhue0782ab2018-01-09 13:24:13 -05005\alias{footnote_marker_alphabet}
6\alias{footnote_marker_symbol}
Hao Zhu1ac13ad2018-01-08 16:12:24 -05007\title{Footnote marker}
8\usage{
9footnote_marker_number(x, format)
Hao Zhue0782ab2018-01-09 13:24:13 -050010
11footnote_marker_alphabet(x, format)
12
13footnote_marker_symbol(x, format)
14}
15\arguments{
16\item{x}{a number. For example, for \code{footnote_marker_alphabet(2)} will
17return "b" in HTML.}
18
19\item{format}{Either \code{html} or \code{latex}. All functions here can read
20default value from global option \code{knitr.table.format}.}
Hao Zhu1ac13ad2018-01-08 16:12:24 -050021}
22\description{
Hao Zhue0782ab2018-01-09 13:24:13 -050023Put footnote mark in superscription in table. Unless you are
24using it in the \code{caption} of \code{kable}, you will need to put \code{escape = F}
25in \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 Zhu1ac13ad2018-01-08 16:12:24 -050028}
Hao Zhu593f57e2018-01-09 13:30:01 -050029\examples{
Hao Zhub1e2e3d2018-01-09 13:31:42 -050030dt <- mtcars[1:5, 1:5]
Hao Zhu593f57e2018-01-09 13:30:01 -050031colnames(dt)[1] <- paste0("mpg", footnote_marker_alphabet(2, "html"))
32rownames(dt)[2] <- paste0(rownames(dt)[2], footnote_marker_alphabet(1, "html"))
33footnote(knitr::kable(dt, "html"), alphabet = c("Note a", "Note b"))
34
35}