Both the match()
(returns the first appearance) and %in%
(returns a Boolean) functions are designed for this.
v <- c('a','com/tag/b">b','c','e')
'com/tag/b">b' %in% v
## returns TRUE
match('com/tag/b">b',v)
## returns the first location of 'com/tag/b">b', in this com/tag/case">case: 2
manpreet
Best Answer
2 years ago
How to check if a vector contains a given value?