aovRoundDigits: aovRoundDigits

Description Usage Arguments Value Examples

View source: R/anova.R

Description

Round digits to n decimal places in ezANOVA table

Usage

1

Arguments

aovObj

Output from aov or ezANOVA

Value

dataframe

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Example 1:
# create dataframe with 2(Comp: comp vs. incomp) and 2(Side: left vs. right) factors/levels
dat <- createDF(nVP = 20, nTrl = 1,
                design = list("Comp" = c("comp", "incomp"),
                              "Side" = c("left", "right")))

dat <- addDataDF(dat,
                 RT = list("Comp:Side comp:left"    = c(500, 150, 150),
                           "Comp:Side comp:right"   = c(500, 150, 150),
                           "Comp:Side incomp:left"  = c(500, 150, 150),
                           "Comp:Side incomp:right" = c(500, 150, 150)))

aovRT <- aov(RT ~ Comp*Side + Error(VP/(Comp*Side)), dat)
aovRT <- aovRoundDigits(aovRT)
aovDispTable(aovRT)

# or using ezANOVA
library(ez)
aovRT <- ezANOVA(dat, dv=.(RT), wid = .(VP), within = .(Comp, Side),
                 return_aov = TRUE, detailed = TRUE)
aovRT <- aovRoundDigits(aovRT)
aovDispTable(aovRT)

psychReport documentation built on May 6, 2021, 5:05 p.m.