On Thu, 2006-06-01 at 11:06 -0400, Mu Tian wrote: > I want to get index number of 0s, like > > x <- c(1, 2, 0, 3, 0, 4) > > I want an output of > > 3, 5 > > Thank you. See ?which > which(x == 0) [1] 3 5 HTH, Marc Schwartz