[R] out of bound

From: Stat Consult <statconsult90_at_gmail.com>
Date: Sat, 05 Mar 2011 16:14:20 +0330


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]]



R-help_at_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. Received on Sat 05 Mar 2011 - 15:37:38 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 05 Mar 2011 - 15:50:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive