The apa7 package generates publication-ready tables in APA style. Pass a fitted model or a data frame to an apa_* function, and you get a table with APA-style numbers, headers, and borders. Most tables also come with a written note that explains abbreviations, tests, and stars.
Installation
Install the released version from CRAN:
install.packages("apa7")Or install the development version from r-universe:
install.packages("apa7", repos = "https://wjschne.r-universe.dev")Example data
The examples use a study by Garcia et al. (2010), which comes with the psych package. Participants read about a woman who was denied a promotion because of sex discrimination. In the experiment, the vignette was altered such that she protested individually, protested on behalf of women collectively, or did not protest at all. Participants then rated how much they liked her. Their perceptions of how pervasive sexism is were also measured.
Regression
Fit a model as usual, and pass it to apa_parameters. apa_flextable(note = TRUE) creates the table and adds the note.
lm(liking ~ protest + sexism, data = d) |>
apa_parameters() |>
apa_flextable(note = TRUE)
Correlations
d |>
dplyr::select(Anger = anger, Liking = liking,
`Response Appropriateness` = respappr,
`Perceived Sexism` = sexism) |>
apa_cor() |>
apa_flextable(note = TRUE)
Reliability
Internal consistency of the Big Five scales in the psych package’s bfi data, with reverse-keyed items:
tb <- apa_reliability(
psych::bfi,
scales = list(
Agreeableness = A1:A5,
Conscientiousness = C1:C5,
Extraversion = E1:E5,
Neuroticism = N1:N5,
Openness = O1:O5
),
reverse = c(A1, C4, C5, E1, E2, O2, O5),
level = "scales"
) |>
apa_flextable(note = TRUE)Learn more
- Getting started: table notes, defaults, table widths, and formatting functions.
- Articles on each kind of table: regression, multilevel models, ANOVA, marginal means, hypothesis tests, descriptive statistics, correlations, contingency tables, reliability, factor analysis, structural equation models, meta-analysis, and tables built by hand.
- apaquarto: write a complete APA-style manuscript in Quarto, with apa7 tables.
Reference
Garcia, D. M., Schmitt, M. T., Branscombe, N. R., & Ellemers, N. (2010). Women’s reactions to ingroup members who protest discriminatory treatment: The importance of beliefs about inequality and response appropriateness. European Journal of Social Psychology, 40(5), 733–745. https://doi.org/10.1002/ejsp.644

