I want to remove the rows of a data frame that meet certain conditions based on 2 columns:
- contain
_text1
inColumn1
- don't have
text2
exact match inColumn2
I've managed to find a way to filter the rows I want to remove with the below code:
Table%>%filter(str_detect(Column1, '_text1') & Column2!="text2")
but I can't think of a way to reverse the code in order give me back the rows I want to keep, by simultaneously satisfying both conditions.