Skip to content
Prev 244743 / 398503 Next

check for item in vector

Dear R users,

Suppose I have an vector like this:

animal <- c("Tiger","Panda")

I would like to know is there any function that check for the
existence of certain item in a vector.

e.g.
TRUE
FALSE

I know that it can be done by for loop. But I would like to know is
there any built-in function for that.

Thank you very much.

CH