ttestFun {marray} | R Documentation |
Returns a function that calculate t.test
.
ttestFun(y = NULL, var.equal = FALSE, alternative = c("two.sided", "less", "greater"), na.rm = TRUE)
y |
vector of class labels. Must consist of integers 1 and 2. |
var.equal |
a logical variable indicating whether to treat the two variances as being equal. If `TRUE' then the pooled variance is used to estimate the variance otherwise the Welch approximation to the degrees of freedom is used. |
alternative |
a character string specifying the alternative hypothesis, must be one of `"two.sided"' (default), `"greater"' or `"less"'. You can specify just the initial letter. |
na.rm |
If TRUE, the NA's are omit from the analysis. |
Returns a function that performs t.test
.
Yee Hwa (Jean) Yang
x <- rnorm(10) y <- ttestFun() y(x)