add_footnote: Add a footnote attribute to a table

View source: R/generate_modifiers.R

add_footnoteR Documentation

Add a footnote attribute to a table

Description

Add a footnote attribute to a table

Usage

add_footnote(
  data,
  footnote,
  locations = NULL,
  placement = c("auto", "right", "left")
)

Arguments

data

A data frame, tibble, or tsg object to which a footnote attribute will be added.

footnote

The footnote text to be added.

locations

Locations where the footnote should be applied. Default is NULL (applies to entire table).

placement

Placement of the footnote. One of "auto" (default), "right", or "left".

Value

The input data frame with an added footnote attribute.

Examples

add_footnote(
  dplyr::starwars,
  footnote = "This is a footnote.",
  locations = c("A1", "B2"),
  placement = "right"
)

tsg documentation built on Feb. 22, 2026, 5:08 p.m.