library("psych350lab")
data(superman, package = "psych350data")
sm <- superman
sm$era <- ifelse(sm$year >= 2000, 2, 1)
result <- anova_factorial_answers(sm, dv = "clark_height_in",
iv1 = "clark_grp", iv2 = "era",
iv1_labels = c("Under 6ft", "6ft+"),
iv2_labels = c("Pre-2000", "Post-2000"))
ft <- create_apa_factbg_desc_table(result,
iv1_name = "Height Group", iv2_name = "Era",
dv_name = "Height (inches)")
ftFactorial APA Descriptive Statistics Table (Flextable)
Description
Creates an APA-formatted descriptive statistics table for a factorial design showing cell means, SDs, and ns organized by IV1 and IV2 levels.
Usage
create_apa_factbg_desc_table(
anova_results_list,
iv1_name = "IV1",
iv2_name = "IV2",
dv_name = "DV",
Key = TRUE,
table_title = NULL
)
Arguments
anova_results_list
|
Output from anova_factorial_answers().
|
iv1_name
|
Character. Display name for IV1. |
iv2_name
|
Character. Display name for IV2. |
dv_name
|
Character. Display name for DV (used in caption). |
Key
|
Logical. If TRUE, fill with values; if FALSE, blank.
|
table_title
|
Character or NULL. Optional table caption.
|
Value
A flextable::flextable() object.