I am trying to remove duplicates by req_id, but need to keep the specific req_id that have values of (1) in the Offer_accepted or Offer_rejected colulmns. I tried messing around with Tidy package, but couldn't quite figure out how to do this properly.
Sample Data:
structure(list(req_id = c(335, 335, 335, 335, 336, 336, 336,
337, 337, 337, 337), Offer_accepted = c(1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0), Offer_rejected = c(0, 0, 0, 0, 1, 0, 0, 1, 0, 0,
0)), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA,
-11L))
