| lt_footnote | R Documentation |
Attaches a footnote text to a table region. Footnotes are numbered
automatically in the order they are added (de-duplicated by text).
lt_footnote(x, text, where, columns = NULL, rows = NULL, match = NULL)
x |
An |
text |
Footnote text. |
where |
One of |
columns |
Character names, integer positions, or a one-sided formula
(for |
rows |
Integer vector of 1-based row indices (for |
match |
For |
x with the footnote recorded.
lt(head(mtcars)) |>
lt_footnote("Source: 1974 Motor Trend US magazine.", "title")
# raw HTML footnote (wrap in I())
lt(head(mtcars)) |>
lt_footnote(I("See <a href='#'>docs</a>."), "title")
# a footnote for each of the six locations
d = data.frame(
Arm = c("Treatment", "Treatment", "Control", "Control"),
Stat = c("n", "Mean", "n", "Mean"),
Value = c(31, 6.8, 30, 4.2),
SE = c(NA, 0.42, NA, 0.38)
)
lt(d) |>
lt_group(~ Arm) |>
lt_header(title = "Study Results", subtitle = "Two arms") |>
lt_spanner(Summary ~ Value + SE) |>
lt_footnote("Source: simulated trial data.", "title") |>
lt_footnote("Intention-to-treat population.", "subtitle") |>
lt_footnote("Standard error of the mean.", "column", "SE") |>
lt_footnote("Per-arm summary statistics.", "spanner", "Summary") |>
lt_footnote("Received active drug.", "group", "Treatment") |>
lt_footnote("SE undefined for counts.", "body", "SE", rows = c(1, 3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.