I need to extract the earliest date of surgery from my file, but if I use the codes I'm used to, it deletes duplicated dates.
For example if a person has 2 different surgeries but at the same date, R deletes one of these surgeries, so I am left with only one of them.
I need to find a solution that can retrieve the earliest date of surgeries, but if one person have two different surgeries at the same time, I would like to keep both dates (which are then duplicates).
"D_ODTO" is the surgery date and "C_OPR" is the surgery type. "PNR" is ID names.