setdiff function requires x,y inputs of the same class. If x is a dataframe and y is a vector how do I use this function?

The lack of the data spoils what would otherwise be a reprex (see the FAQ). Many more people are willing to help with concrete code if they don't have to reverse engineer the question.