How to tell what is in one vector and not another? January 13, 2023 by Tarik you can use the setdiff() (set difference) function: > setdiff(x, y) [1] 1