meanStrT: meanStrT

View source: R/ttest.R

meanStrTR Documentation

meanStrT

Description

Returns a string with the mean value from a t.test in Latex format.

Usage

meanStrT(tObj, numDigits = 0, unit = "")

Arguments

tObj

The returned object from a call to t.test

numDigits

The number of digits to round to

unit

"" vs. "ms" vs. "mv" vs. "%"

Value

character

Examples

# Example 1:
# create dataframe and add data
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)

tString <- meanStrT(tObj, numDigits = 0, unit = "ms")


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