# Example 1:
library(ez)
# create dataframe
dat <- createDF(nVP = 6, nTrl = 1,
design = list("Comp" = c("comp", "incomp", "neutral")))
dat <- addDataDF(dat, RT = list("Comp comp" = c(500, 150, 100),
"Comp incomp" = c(520, 150, 100),
"Comp neutral" = c(510, 150, 100)))
printTable(dat, digits = c(0, 2)) # latex formatted
printTable(dat, digits = 0) # latex formatted
dat$VP <- as.factor(dat$VP)
aovRT <- ezANOVA(dat, dv=.(RT), wid = .(VP), within = .(Comp),
return_aov = TRUE, detailed = TRUE)
aovRT <- aovTable(aovRT)
printTable(aovRT$ANOVA) # latex formatted
printTable(aovRT$ANOVA, digits = c(0,2,2,2)) # latex formatted
Run the code above in your browser using DataLab