Learn R Programming

SwathXtend (version 1.0.0)

applyttest: 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.

Details

References

See Also

applyttestPep

Examples

Run this code
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)


Run the code above in your browser using DataLab