printAovMeans: printAovMeans

Description Usage Arguments Value Examples

View source: R/anova.R

Description

Returns Latex formatted table of marginal means from model.tables. Uses printTable (xtable) latex package with some basic defaults. For more examples, see R package xtable

Usage

1
printAovMeans(..., caption = "Mean", digits = 3, dv = "ms")

Arguments

...

Output from aov or ezANOVA (NB. ezANOVA must be called with detailed = TRUE)

caption

Title for the table

digits

Number of digits to round to

dv

Name of the dependent variable (e.g., "ms", "%")

Value

character

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Example 1:
# create dataframe
dat <- createDF(nVP = 6, nTrl = 1,
                design = list("Comp" = c("comp", "incomp")))

dat <- addDataDF(dat, RT = list("Comp comp"   = c(500, 150, 100),
                                "Comp incomp" = c(520, 150, 100)))

aovRT <- aov(RT ~ Comp + Error(VP/(Comp)), dat)
aovRT <- aovTable(aovRT)
printAovMeans(aovRT, digits = 3, dv = "ms")  # latex formatted

# or using ezANOVA
library(ez)
aovRT <- ezANOVA(dat, dv=.(RT), wid = .(VP), within = .(Comp), return_aov = TRUE, detailed = TRUE)
aovRT <- aovTable(aovRT)
printAovMeans(aovRT, digits = 0, dv = "ms")  # latex formatted

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