The tibbles returned by apa_parameters(), apa_performance(), and
apa_performance_comparison() have class apa7_tbl. They are ordinary
tibbles for post-processing with dplyr, but in knitr and Quarto documents
they are rendered as an apa_flextable() automatically. In the console they
print as tibbles.
Usage
# S3 method for class 'apa7_tbl'
print(x, ...)
# S3 method for class 'apa7_tbl'
knit_print(x, ...)Details
The apa7.print option controls this behavior:
"auto"(default): flextable in knitr/Quarto, tibble in the console."flextable": flextable everywhere."tibble": tibble everywhere.
To render with non-default settings, pass the table to apa_flextable()
explicitly, which always returns a flextable.
Examples
fit <- lm(mpg ~ cyl + wt, data = mtcars)
# Prints as a tibble in the console
apa_parameters(fit)
#> # A tibble: 3 × 6
#> Variable `*B*` `*SE*` `β` `*t*(29)` `*p*`
#> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 Constant 39.69 1.71 .00 23.14 <.001
#> 2 Cyl −1.51 0.41 −.45 −3.64 .001
#> 3 Wt −3.19 0.76 −.52 −4.22 <.001
# It is still a tibble, so it can be post-processed
apa_parameters(fit) |>
dplyr::filter(Variable != "Constant") |>
apa_flextable()
Variable
B
SE
β
t(29)
p
Cyl
−1.51
0.41
−.45
−3.64
.001
Wt
−3.19
0.76
−.52
−4.22
<.001