I am trying to rearrange the identification data (ID) that is duplicated. Each ID is duplicated, because the person uses more than one drug type.
Each code represents the name of the drug and in each column titled (drug1
; drug2
; drug3
) there is information if the person takes (1) or does not take (0)
Into:
As the code is the name of the drug (drug1= code 17
; Drug2 = code 5
; Drug3 = code 3
), when remodeling the code column it would not appear in the database
I think using reshape
will not achieve the result I expect.
I would be very grateful for the help!!