Hi
I am new to this forum and my question may have been addressed before.
I am working on a data where patients ( variable name = recordid) have received multiple treatments on different dates ( variable name = Dato).
The column of recordid shows same recordids and infront of them multiple Dato in ascending order.
I want to group similar recordids and their Datos with numbers as 1,2,3,4,.. in ascending order.
the dataset is
recordid Dato
010462xxxx 22mar2021
010462xxxx 19mar2021
010462xxxx 26mar2021
010462xxxx 24mar2021
010462xxxx 31mar2021
010462xxxx 29mar2021
010548yyyy 18oct2021
010548yyyy 27aug2021
010548yyyy 27sep2021
I would like to convert it to
010462xxxx 1(22mar2021)
2(19mar2021)
3 (26mar2021)
010548yyyy. 1(18oct2021)
and further.
Sorry for a very basic question.
Thanks in Advance.
I am new to this forum and my question may have been addressed before.
I am working on a data where patients ( variable name = recordid) have received multiple treatments on different dates ( variable name = Dato).
The column of recordid shows same recordids and infront of them multiple Dato in ascending order.
I want to group similar recordids and their Datos with numbers as 1,2,3,4,.. in ascending order.
the dataset is
recordid Dato
010462xxxx 22mar2021
010462xxxx 19mar2021
010462xxxx 26mar2021
010462xxxx 24mar2021
010462xxxx 31mar2021
010462xxxx 29mar2021
010548yyyy 18oct2021
010548yyyy 27aug2021
010548yyyy 27sep2021
I would like to convert it to
010462xxxx 1(22mar2021)
2(19mar2021)
3 (26mar2021)
010548yyyy. 1(18oct2021)
and further.
Sorry for a very basic question.
Thanks in Advance.
Comment