[R] Function to check if a vector contains a given value?

Dimitri Liakhovitski ld7631 at gmail.com
Wed Sep 23 17:37:48 CEST 2009


Dear R'rs,

is there a function that checks if a given vector contains a certain value.
E.g., x<-c(1,2,3,4).
How can I get a TRUE or FALSE for whether x contains a 2?

-- 
Dimitri Liakhovitski
Ninah.com
Dimitri.Liakhovitski at ninah.com




More information about the R-help mailing list