In R, I have an element x and a vector v. I want to find the first index of an element in v that is equal to x