[R] T2 hoteling

leyla khodakarim lkhodakarim at gmail.com
Sun Dec 26 14:43:41 CET 2010


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


-


More information about the R-help mailing list