How to check if a vector contains a given value?
The any() function makes for readable code
> w <- c(1,2,3) > any(w==1) [1] TRUE > v <- c('a','b','c') > any(v=='b') [1] TRUE > any(v=='f') [1] FALSE