Entering edit mode
6.2 years ago
gladnovin
•
0
HI, I have a code , I dont know if the code exactly falls for paired t test or not?
logX.cl <- c(0, 0, 1,1)
ttest = function(x) {
tt = t.test(x[logX.cl == 0], x[logX.cl == 1])
return(c(tt$statistic, tt$p.value))
}
No, look here: https://stat.ethz.ch/R-manual/R-devel/library/stats/html/t.test.html
In this example, though, you are literally just comparing 2 values versus 2 values - makes no sense (?). Whatever is in the object
x
, you will only be taking index 1-4 from it.Can you please explain what you are aiming to do? For microarray data, the common (and I would say standardised, at this stage) method to use is limma: https://bioconductor.org/packages/release/bioc/html/limma.html