Search code examples
rdplyroperators

"not like" operator


Is there a possibility to use filtering in dplyr and use negative of like operator? Something like (which does not work):

my_df %>% 
  filter(text !%like% "dirty talk")

Solution

  • just like this:

    my_df %>% 
        filter(!text %like% "dirty talk")
    

    Since placing the exclamation like so makes the statement not