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

Description Usage Arguments Value See Also Examples

View source: R/applyttest.R

Description

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

Usage

1
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

1
2
3
4
5
6
7
8
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)

SwathXtend documentation built on Nov. 8, 2020, 6:42 p.m.