x <- c("a", "b", "c", "d", "e", "f", "g")
y <- c("a", "c", "d", "z")
I am trying to compare y to x and find an index where in y that does not match with anything in x. in this case z does match and I want R to return the index of z.
This is one of the things I tried and it does not work.
index <- which(y != x)