Couldn't exactly explain the subject, so here's the example: idx<-which(blah[,1]=="xyz") idx integer(0) How do I test that idx has a valid value (namely, > 0)? TiA, Joe