rowTtest: rowTtest

View source: R/statTest.R

rowTtestR Documentation

rowTtest

Description

performs a two-sided Welch's t-test (unequal variances, equal or unequal sample sizes) on each row of a matrix X with the indices inds.1 vs indices idx2 as group assignments.

Usage

rowTtest(X, idx1, idx2 = -idx1, na.rm = FALSE, alternative = "two.sided")

Arguments

X

Matrix on which the test is performed for every row

idx1

column indices of group 1 members

idx2

column indices of group 2 members

na.rm

Should NAs be removed (logical)

alternative

Testing alternative. Must be one of "two.sided" (default),"less","greater" or "all". in case of "all" a data frome with corresping alternative variables is returned. Otherwise the result is a vector.

Value

vector (or data.frame if alternative=="all") of p-values resulting from the Welch's t-test

Note

Requires matrixStats package

Author(s)

Fabian Mueller


demuellae/muRtools documentation built on Sept. 8, 2023, 4:32 p.m.