I have a data set with many duplicates for each observation, some duplicates have the same test results while other duplicates have different test results. for example: Person1. Positive Person1. Positive Person2. Unknown Person2. Positive Person3. Unknown Person3. Missing In the scenario for person2, I want to keep the duplicate with a positive test result over the unknown and for person1, I want to keep just one of the results since they are the same. Person3, I'd like to keep the unknown duplicate over the missing. I've already ordered the test results for positive =1 unk=2, missing =3. How can I code it to drop certain duplicates based on the test result status?
... View more