applyttest {SwathXtend}R Documentation

Utility to apply a t-test to all rows of a matrix

Description

Generate fold change and t-test p-value for all rows of a data matrix

Usage

applyttest(mat, Group, doLogs = TRUE, numerator = levels(Group)[1])

Arguments

mat

Matrix containing data, possibly with missing values

Group

Group with two levels of length equal to the number of matrix columns

doLogs

True/false, log data before applying test

numerator

The level of the group used as numerator for the fold change, by default the first one

Value

Data frame with two values, t-test p-value and fold change.

See Also

applyttestPep

Examples

mat = matrix(rnorm(600), nrow=100)
mat[1:20, 1:3] = 3+mat[1:20, 1:3] # create some differences
mat[30, 1:3] = NA # and some missing values
mat[100,] = NA


applyttest(mat, Group = rep(c("A", "B"), each=3), doLogs=FALSE)
applyttest(abs(mat), Group = rep(c("A", "B"), each=3), doLogs=TRUE)



[Package SwathXtend version 2.10.0 Index]