I have a dataset with several columns. Two of them (Patients ID and timepoint) are as follows:
ID | Timepoint
3 | Day1Hour0
3 | Day2Hour4
3 | Day3Hour0
4 | Day1Hour0
4 | Day2Hour4
4 | Day4Hour0
6 | Day1Hour0
6 | Day2Hour4
6 | Day3Hour0
As you can see, the last time is different for some patients.
I want to split the dataset so I will have all the patients that has a Day4 timepoint in one side, and those with Day3 in other.
So I would get something like:
Data1
ID | Timepoint
3 | Day1Hour0
3 | Day2Hour4
3 | Day3Hour0
6 | Day1Hour0
6 | Day2Hour4
6 | Day3Hour0
Data2
4 | Day1Hour0
4 | Day2Hour4
4 | Day4Hour0