SyntaxFix
Write A Post
Hire A Developer
Questions
The expression df1$id %in% idNums1 produces a logical vector. To negate it, you need to negate the whole vector:
df1$id %in% idNums1
!(df1$id %in% idNums1)