Dear ALL I cannot run this line. stat.obs <- apply (GS, 2, function(z) Hott2(t(DATA[which(z==1),]), cl)) Error in Hott2 (t(DATA[which(z == 1), ]), cl) : subscript out of bounds I will be glade if you guide me. ******************************************************************************* *GS is a matrix 1857*200 *DATA is a matrix 1857*79 *cl <- as.factor(y) *y<-*c(1,0,1,0,1,0,0,0,0,0,0,0,1,1,0,0,0,1,0,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,1,0,0,1,1,0,0,1,1,0,0,0,1,0,1,0*,0,1,1,1,0,1,1,1,1,0,1,0,0,0,1,0,1,1,1,1,0,1,0,1,1) *Hott2 <- function(x, y, var.equal=TRUE) ******************************************************************************** [[alternative HTML version deleted]]