Julia equivalent to R %in%

#1

I am trying to find the Julia equivalent to the R statement:

which(A %in% B)

Any help appreciated

#2

I’m not sure what the which function returns. Maybe find indices of elements? Does this do what you want?

findall(in(B), A)
3 Likes
#3

It’s almost the same R’s which returns only the indec of positions that are true

1 Like
#4

That worked fine.

Many thanks