Tag: match

54 votes
4 answers
2.4K views
Is there an R function for finding the index of an element in a vector?

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

avatar
Basil
0 1 0 9
asked 07 September, 2021