Wrap t.test (difference in means by group).
# S3 method for numeric wrapTTest( x, pop2, ..., y = NULL, alternative = c("two.sided", "less", "greater"), mu = 0, paired = FALSE, var.equal = FALSE, conf.level = 0.95, na.rm = FALSE )
x | numeric population 1 |
---|---|
pop2 | numeric population 2 |
... | extra arguments passed to ttest |
y | passed to |
alternative | passed to |
mu | passed to |
paired | passed to |
var.equal | passed to |
conf.level | passed to |
na.rm | logical, if TRUE remove NA values |
formatted string and fields
d <- data.frame(x=c(1,2,3,4,5,6,7,7), y=c(1,1,2,2,3,3,4,4)) render(wrapTTest(d$x, d$y), pLargeCutoff=1)#> [1] "Welch Two Sample t-test, two.sided: (t=2.072, df=10.62, p=0.06349)."#> [1] "Welch Two Sample t-test, two.sided: (t=-2.072, df=10.62, p=0.06349)."