Skip to contents

Title

Usage

gt_theme_apa(
  data,
  dec_dig = 1,
  corr_dig = 3,
  fmt_extreme = TRUE,
  bg_color = "#FFFFFF",
  font = "Arial",
  font_size = 11,
  ...
)

Arguments

data

The gt table data object.

dec_dig

The number of decimal places to round to for numeric values.

corr_dig

The number of decimal places to round to for numeric values all constrained to be between [-1, 1].

fmt_extreme

Logical indicator for whether values close to extremes should be suppressed (e.g., .000001 becomes <.001).

bg_color

The background color of the table.

font

The font to use for the table.

font_size

The base font size for the table.

...

Additional options passed to gt::tab_options()

Value

An object of class gt-tbl.

Examples

gt::gt(head(penguins)) |>
  gt_theme_apa() |>
  gt::fmt_number(year, sep_mark = "", decimals = 0)
species island bill_len bill_dep flipper_len body_mass sex year
Adelie Torgersen 39.1 18.7 181  3,750  male 2007 
Adelie Torgersen 39.5 17.4 186  3,800  female 2007 
Adelie Torgersen 40.3 18.0 195  3,250  female 2007 
Adelie Torgersen NA NA NA NA NA 2007 
Adelie Torgersen 36.7 19.3 193  3,450  female 2007 
Adelie Torgersen 39.3 20.6 190  3,650  male 2007