I would like to drop a whole row if there is a 1 in any column having a name that ends with "rem" or "nocut". Sorry, I can't list the whole data set here because it's too large. Here is an example of my data:
Sequence| #1C_cut | #2C_nocut | #1C_rem | #3C_cut | #3C_rem | #4C_nocut|
R1 | 0 | 0 | 1 | 1 | 0 | 0 |
R2 | 0 | 1 | 0 | 0 | 0 | 1 |
R3 | 1 | 0 | 0 | 0 | 0 | 0 |
R4 | 0 | 0 | 0 | 1 | 0 | 0 |
R5 | 1 | 0 | 0 | 1 | 0 | 0 |
What I want:
Sequence| #1C_cut | #2C_nocut | #1C_rem | #3C_cut | #3C_rem | #4C_nocut|
R3 | 1 | 0 | 0 | 0 | 0 | 0 |
R4 | 0 | 0 | 0 | 1 | 0 | 0 |
R5 | 1 | 0 | 0 | 1 | 0 | 0 |
I have an idea of combining select() and filter() function in dplyr to solve this problem, but I don't know how to do that......