# Using the ez package
if (requireNamespace("ez", quietly = TRUE)) {
data(ANT, package = "ez")
x <- ez::ezANOVA(ANT[ANT$error==0,], dv = rt, wid = subnum,
within = c(cue, flank), between = group, detailed = TRUE)
anova_apa(x)
}
# Using the afex package
if (requireNamespace("afex", quietly = TRUE)) {
data(md_12.1, package = "afex")
y <- afex::aov_ez(id = "id", dv = "rt", data = md_12.1,
within = c("angle", "noise"))
anova_apa(y)
}
Run the code above in your browser using DataLab