Essentially I would like to filter a column if another column contains a value. Here is an example:
my_df <- data.frame(x = c(1,1,1,2,2,2),
y = c(1,2,3,4,5,6))
> my_df
x y
1 1 1
2 1 2
3 1 3
4 2 4
5 2 5
6 2 6
Let's filter x!=1 if and only if y!=1. Here is my expected result:
x y
1 1 1
2 2 4
3 2 5
4 2 6