Dear All It is very kind of you to guide me.
When I want to run this line, I see this error stat.obs <- apply(GS, 2, function(z) Hott2(t(DATA[which(z==1),]), cl)) Error in colSums(w * x) : 'x' must be an array of at least two dimensions cl <- as.factor(y) GS: a matrix with 0 or 1 GS: gene sets -> a data matrix with rows=genes, columns= gene sets, GS[i,j]=1 if gene i in gene set j GS[i,j]=0 otherwise Hott2 <- function(x, y, var.equal=TRUE) #T2 hoteling Y<- c(1,0,0,0,0,0,1,1,0,0,1,0,1,1,1,1,0,1,0,1) Data=transpose(X)= gene expression: row=40 gene, column=10 sample Data: there is in attachment file Thanks a lot -
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.