Add a footnote to the specification. Multiple calls add multiple footnote groups. Calling with the same ID merges with last-win strategy.
Arguments
- spec
TFL spec object
- text
Character vector of footnote text lines
- id
Footnote identifier (auto-generated if NULL)
- styleRef
Character vector of style names or result of
f_combine(). Merged with last-win strategy.- order
Order of footnote group (auto-assigned if NULL)
Examples
spec <- create_table(mtcars) |>
add_footnote("Data source: Clinical database lock 2025-12-01") |>
add_footnote("Missing values displayed as 'N/A'",
styleRef = f_combine("i", "font_courier_new"))
# Multiple footnote lines in one group
spec2 <- create_table(mtcars) |>
add_footnote(c("a. Treatment group A", "b. Treatment group B"))