I have
df %>% filter(column_A != "Char1", column_A != "Char2", column_B != "Char3")
which works but doesn't work when I do this
df %>% filter((column_A != "Char1" || "Char2"), column_B != "Char3")
How do I correct this syntax?
CodePudding user response:
You are searching for the operator %in%
df %>% filter(!column_A %in% c("Char1", "Char2"), column_B != "Char3")