If you have a vector of strings and you want to know which match. It's a simple matter of using %in%.
x <- c("red","blue","green")
y <- c("yellow","blue","orange")
which(x %in% y) # Literally, which X are in Y.
But what about the opposite, where you would like to find which X are not in Y?