Jason Liao <jg_liao at yahoo.com> writes: > without having to check the vector element by element? Thanks a lot! If vec is your vector of logical values then match(TRUE, vec) should work. It will return NA if there are no TRUE values.