Description Usage Arguments Details Value Author(s) See Also Examples
A convenient function to replace fastT() or rowttest() from genefilter package. Only Student's two sample t-test is implemented in the current version.
1 | fastt(X, classlabel)
|
X |
A data frame or matrix, with p rows corresponding to
variables (hypotheses) and n columns to observations. In the
case of gene expression data, rows correspond to genes and columns to
mRNA samples. The data can be read using |
classlabel |
A vector of integers corresponding to observation (column) class labels. For k classes, the labels must be integers between 0 and k-1. We only implemented two-sample test as of 08/01/2015. |
Some details.
A vector of two-sample t-statistics
Xing Qiu, Yuhang Liu, Jinfeng Zhang
1 2 3 4 5 6 7 8 9 | ## The Golub data. On my computer, it takes about 3 seconds to run, YMMV.
## The result is a data.frame with two columns: teststat and rawp.
data(golub)
classlabel<-golub.cl
system.time(tvec1 <- fastt(golub, classlabel))
## You can try the standard t.test(). It is much slower.
## Not run: system.time(tvec2 <- apply(golub, 1, function(x) t.test(x~classlabel, var.equal=TRUE)$statistics))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.