Skip to contents

Style object with APA style

Usage

apa_style(
  x,
  family = "Times New Roman",
  font_size = 12,
  text_color = "black",
  border_color = "black",
  border_width = 0.5,
  line_spacing = 2,
  horizontal_padding = 3
)

# S3 method for class 'gt_tbl'
apa_style(
  x,
  family = "Times New Roman",
  font_size = 12,
  text_color = "black",
  border_color = "black",
  border_width = 0.5,
  line_spacing = 2,
  horizontal_padding = 3
)

# S3 method for class 'flextable'
apa_style(
  x,
  family = "Times New Roman",
  font_size = 12,
  text_color = "black",
  border_color = "black",
  border_width = 0.5,
  line_spacing = 2,
  horizontal_padding = 3
)

Arguments

x

object

family

font family

font_size

font size

text_color

text color

border_color

border color

border_width

border width in pixels

line_spacing

spacing between lines

horizontal_padding

horizontal padding (in pixels)

Value

object

Examples

d <- data.frame(x = 1:3, y = 4:6)
flextable::flextable(d) |>
  apa_style()

x

y

1

4

2

5

3

6

gt::gt(d) |> apa_style()
x y
1 4
2 5
3 6