Julia equivalent to R %in%

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

which(A %in% B)

Any help appreciated

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

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

1 Like

That worked fine.

Many thanks