Find all positions of all matches of one vector of values in second vector

后端 未结 2 1991
[愿得一人]
[愿得一人] 2020-12-11 04:54

I need to find all positions in my vector corresponding to any of values of another vector:

needles <- c(4, 3, 9)
hay <- c(2, 3, 4, 5, 3, 7)
mymatches(         


        
2条回答
提交回复
热议问题