opt_footnote_marks: Option to modify the set of footnote marks

Description Usage Arguments Details Value Figures Function ID See Also Examples

View source: R/opts.R

Description

Alter the footnote marks for any footnotes that may be present in the table. Either a vector of marks can be provided (including Unicode characters), or, a specific keyword could be used to signify a preset sequence. This function serves as a shortcut for using tab_options(footnotes.marks = {marks})

Usage

1

Arguments

data

A table object that is created using the gt() function.

marks

Either a character vector of length greater than 1 (that will represent the series of marks) or a single keyword that represents a preset sequence of marks. The valid keywords are: "numbers" (for numeric marks), "letters" and "LETTERS" (for lowercase and uppercase alphabetic marks), "standard" (for a traditional set of four symbol marks), and "extended" (which adds two more symbols to the standard set).

Details

We can supply a vector of that will represent the series of marks. The series of footnote marks is recycled when its usage goes beyond the length of the set. At each cycle, the marks are simply doubled, tripled, and so on (e.g., * -> ** -> ***). The option exists for providing keywords for certain types of footnote marks. The keywords are:

Value

An object of class gt_tbl.

Figures

Function ID

9-1

See Also

Other Table Option Functions: opt_align_table_header(), opt_all_caps(), opt_css(), opt_row_striping(), opt_table_font(), opt_table_lines(), opt_table_outline()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Use `sza` to create a gt table,
# adding three footnotes; call
# `opt_footnote_marks()` to specify
# which footnote marks to use
tab_1 <-
  sza %>%
  dplyr::group_by(latitude, tst) %>%
  dplyr::summarize(
    SZA.Max = max(sza),
    SZA.Min = min(sza, na.rm = TRUE)
  ) %>%
  dplyr::ungroup() %>%
  dplyr::filter(latitude == 30, !is.infinite(SZA.Min)) %>%
  dplyr::select(-latitude) %>%
  gt(rowname_col = "tst") %>%
  tab_spanner_delim(delim = ".") %>%
  fmt_missing(
    columns = everything(),
    missing_text = "90+"
  ) %>%
  tab_stubhead("TST") %>%
  tab_footnote(
    footnote = "True solar time.",
    locations = cells_stubhead()
  ) %>%
  tab_footnote(
    footnote = "Solar zenith angle.",
    locations = cells_column_spanners(spanners = "SZA")
  ) %>%
  tab_footnote(
    footnote = "The Lowest SZA.",
    locations = cells_stub(rows = "1200")
  ) %>%
  opt_footnote_marks(marks = "standard")

gt documentation built on May 12, 2021, 9:05 a.m.