SyntaxFix
Write A Post
Hire A Developer
Questions
You could use %in% like this:
%in%
df[, !(colnames(df) %in% c("x","bar","foo"))]