statStrT: statStrT

View source: R/ttest.R

statStrTR Documentation

statStrT

Description

Returns required Latex formatted string T-test required for R/Knitr integration. For example, t(11) = 3.45, p < 0.05. Returns values to 2 sig decimal places and < 0.01, < 0.001 for p values.

Usage

statStrT(tObj)

Arguments

tObj

The returned object from a call to t.test

Value

character

Examples

# Example 1:
# create dataframe and add data with 2(Comp: comp vs. incomp) levels
dat <- createDF(nVP = 50,
                nTrl = 1,
                design = list("Comp" = c("comp", "incomp")))

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

tObj <- t.test(dat$RT[dat$Comp == "incomp"],
               dat$RT[dat$Comp == "comp"],
               paired = TRUE)

statStrT <- statStrT(tObj)


psychReport documentation built on Sept. 9, 2022, 5:08 p.m.