I have a column - "issue_slip" in R dataframe - "vouchers" with values/rows such as
Issue slip: IS/001, IS/001, IS/001, IS/002, IS/002, IS/002
and another column "rec_status" with values 0 or 1. Each issue_slip row can have rec_status 0 or 1. I would like to keep only those issue_slips that have all rec_status as 0 OR 0 or 1 --> remove issue_slip rows that have all rec_status as 1.
For example,
- IS/001 - 1,
- IS/001 - 0 ,
- IS/001 - 1
should show up and not get filtered out because at least one row has rec_status = 1
I tried using the filter and subset functions but could not figure out how to go about filtering this in the same column