Julia: Check if elements from one vector are within another vector [duplicate]
问题 This question already has answers here : Vectorized “in” function in julia? (4 answers) Closed 2 years ago . I would like to check if the elements in one vector are contained within another vector. In R there is the operator %in% . For example the operator would do the following: [1,3,5,7,9,4] %in% [1,2,4,5,8,9,10,11] # [true,false,true,false,true,true] I can easily write my own only I am trying not to reinvent the wheel. 回答1: There are a number of built-ins that do something similar. indexin