Wrap t.test (difference in means by group).

# S3 method for htest
wrapTTest(x, ...)

Arguments

x

t.test result

...

extra arguments (not used)

Value

formatted string and fields

Examples

d <- data.frame(x=c(1,2,3,4,5,6,7,7), y=c(1,1,2,2,3,3,4,4)) tt <- t.test(d$x,d$y) render(wrapTTest(tt),pLargeCutoff=1)
#> [1] "Welch Two Sample t-test, two.sided: (t=2.072, df=10.62, p=0.06349)."
# confirm not rescaling, as a correlation test would render(wrapTTest(t.test(d$x,2*d$y)),pLargeCutoff=1)
#> [1] "Welch Two Sample t-test, two.sided: (t=-0.5369, df=13.96, p=0.5998)."