[R] Function to check the presence of an Item in an array

Gundala Viswanath gundalav at gmail.com
Fri Aug 1 10:41:05 CEST 2008


Hi all,

Is there a way to do it?
For example:

> x
"foo" "bar" "bar2" "qux"

is there a function to return TRUE/FALSE
given a test variable

> func("foo")
TRUE

> func("GUNDALA")
FALSE

Is there such "func" in R?

- Gundala Viswanath
Jakarta - Indonesia



More information about the R-help mailing list