library(apa7)
library(flextable)
library(ftExtra)
library(tidyverse)
set_flextable_defaults(theme_fun = theme_apa,
font.family = "Times New Roman")
Making tables in APA style (Part 4 of 24)
In this 24-part series, each of the tables in Chapter 7 of the Publication Manual of the American Psychological Association (7th Edition) is recreated with apa7, flextable, easystats, and tidyverse functions.
flextable::merge_v
to collapse text acros rows.
Figure 1
Screenshot of the APA Manual’s Table 7.4

APA Manual Table 7.4 in Figure 1 is not entirely visible, so I have reproduced the visible rows only. This table is straightforward to make. I used flextable::merge_v
to remove redundant text in the Study column.
This table is intended to illustrate repeated headers, which is not relevant in the .html display here. Fortunately, when rendered to .docx, flextable repeats headers by default.
```{r}
#| label: tbl-74
#| tbl-cap: Sample and Task Information for Studies Included in the Meta-Analysis.
#| apa-note: "AX-CPT = AX–continuous performance task; DPX = dot–pattern expectancy task."
# Make data and restructure data
<- tibble(
d Study = c(
"Barch et al. (2001)",
"Barch et al. (2008)",
"Becker (2012)",
"Braver et al. (1999)",
"Chung et al. (2011)",
"MacDonald & Carter (2003)",
"Poppe et al. (2016)",
"Reilly et al. (2017)",
"Sheffield et al. (2014)",
"Todd et al. (2014)",
"Zhang et al. (2015)"
),`with first-episode schizophrenia` = c(
14L, NA, NA, 16L, NA, NA, NA, NA, NA, NA, NA),
`with chronic episode schizophrenia` = c(
NA, 57L, 49L, NA, 41L, 17L, 47L, 402L, 104L, 33L, 339L),
`healthy control participants` = c(
12L, 37L, 28L, 16L, 27L, 17L, 56L, 304L, 132L, 58L, 665L),
Task = c(
"AX-CPT",
"AX-CPT",
"AX-CPT",
"AX-CPT",
"AX-CPT",
"AX-CPT",
"DPX",
"DPX",
"AX-CPT, DPX",
"AX-CPT",
"DPX"
)|>
) pivot_longer(where(is.integer)) |>
filter(!is.na(value)) |>
unite(Sample, c(value, name), sep = " ") |>
select(Study, Sample, Task)
# Make table
|>
d apa_flextable() |>
merge_v(j = "Study") |>
align(j = "Sample")
```
Table 1
Sample and Task Information for Studies Included in the Meta-Analysis.
Study | Sample | Task |
---|---|---|
Barch et al. (2001) | 14 with first-episode schizophrenia | AX-CPT |
12 healthy control participants | AX-CPT | |
Barch et al. (2008) | 57 with chronic episode schizophrenia | AX-CPT |
37 healthy control participants | AX-CPT | |
Becker (2012) | 49 with chronic episode schizophrenia | AX-CPT |
28 healthy control participants | AX-CPT | |
Braver et al. (1999) | 16 with first-episode schizophrenia | AX-CPT |
16 healthy control participants | AX-CPT | |
Chung et al. (2011) | 41 with chronic episode schizophrenia | AX-CPT |
27 healthy control participants | AX-CPT | |
MacDonald & Carter (2003) | 17 with chronic episode schizophrenia | AX-CPT |
17 healthy control participants | AX-CPT | |
Poppe et al. (2016) | 47 with chronic episode schizophrenia | DPX |
56 healthy control participants | DPX | |
Reilly et al. (2017) | 402 with chronic episode schizophrenia | DPX |
304 healthy control participants | DPX | |
Sheffield et al. (2014) | 104 with chronic episode schizophrenia | AX-CPT, DPX |
132 healthy control participants | AX-CPT, DPX | |
Todd et al. (2014) | 33 with chronic episode schizophrenia | AX-CPT |
58 healthy control participants | AX-CPT | |
Zhang et al. (2015) | 339 with chronic episode schizophrenia | DPX |
665 healthy control participants | DPX |
Citation
@misc{schneider2025,
author = {Schneider, W. Joel},
title = {Recreating {APA} {Manual} {Table} 7.4 in {R} with Apa7},
date = {2025-08-20},
url = {https://wjschne.github.io/posts/apatables/apa704.html},
langid = {en}
}