Reputation: 119
I'm using the kableExtra
library with R Markdown, I would like to add footnotes to the row labels (and secondary, to other cells).
How can I do that ?
Data example below:
library(kableExtra)
tab = data.frame(matrix(NA, 5,5))
rownames(tab) = paste("info", 1:5)
kable(tab)
I want to add a footnote to info 1
, the label of the 1st line (for example).
Any ideas?
Thanks in advance
Upvotes: 3
Views: 356
Reputation: 679
You can use footnote
from kableExtra
:
dt <- mtcars[1:5, 1:5]
footnote(knitr::kable(dt, "html"), alphabet = c("Note a", "Note b"))
Upvotes: 1