Hi, I need help with solving this problem of duplicates, drop ,etc.
I have the following data:
I would like to keep the patient with headinj (inc_key A & D) and drop those without (inc_key B & C)
But I also want to keep the remaining body part, duplicates inc_key of A & D
Another word, I want to keep all of the inc_key A & D
How do I write a command for this?
Thank you in advance
Narong
inc_key organ severity headinj
A head 3 yes
A chest 3 .
A abdomen 2 .
B chest 3 .
B abdomen 2 .
C abdomen 2 .
D head 3 yes
D chest 3 ,
D abdomen 2 .
I have the following data:
I would like to keep the patient with headinj (inc_key A & D) and drop those without (inc_key B & C)
But I also want to keep the remaining body part, duplicates inc_key of A & D
Another word, I want to keep all of the inc_key A & D
How do I write a command for this?
Thank you in advance
Narong
inc_key organ severity headinj
A head 3 yes
A chest 3 .
A abdomen 2 .
B chest 3 .
B abdomen 2 .
C abdomen 2 .
D head 3 yes
D chest 3 ,
D abdomen 2 .
Comment