Learn R Programming

RnBeads (version 1.4.0)

rowWelchP: rowWelchP

Description

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

Usage

rowWelchP(X, inds.g1, inds.g2 = -inds.g1, na.rm = FALSE, alternative = "two.sided")

Arguments

X
Matrix on which the test is performed for every row
inds.g1
column indices of group 1 members
inds.g2
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

Examples

Run this code

library(RnBeads.hg19)
data(small.example.object)
logger.start(fname=NA)
meth.mat <- meth(rnb.set.example)
sample.groups <- rnb.sample.groups(rnb.set.example)[[1]]
p.vals <- rowWelchP(meth.mat,sample.groups[[1]],sample.groups[[2]])

Run the code above in your browser using DataLab