Hello people, i have a big microarray data set, in which i want to perform a paired t-test among the rows representing each gene, for two indices which consist of the two different groups(samples) to be compared. My samples are 34. Here is my code :
globalt.test <- function (ExpressionSet, ig1, ig2) { for( i in 1:nrow(ExpressionSet) ) { ig1 <- ExpressionSet[i, c(1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33)] ig2 <- ExpressionSet[i, c(2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34)] tt <- t.test(exprs(ig1), exprs(ig2), paired=TRUE, var.equal=FALSE) } u <- return(tt[i]) }
But the function makes a lot of time(there are 54675 features) and then returns:
$NA NULL
Any ideas or suggestions ??
It makes no difference at all except that the columns in the design and fit objects are in a different order.
What difference were you expecting?
Thank you again for your explanation. As i had no previous experience with linear models, i though in the first place that changing the order of the formula in the design matrix, changes the coefficients. But when i checked it with r, changes only the order of the coefficients