To find the elements of a vector, that are not present in another vector, you can use the setdiff() function as follows:
x <- c(1,2,3,4)
y <- c(2,3,4)
To find the elements of x that are not in y:
setdiff(x, y)
[1] 1
To find the elements of y that are not in x:
setdiff(y,x)
numeric(0)