Hello,
Thank you in advance for your help.
I have the following data set.
ID date bp time
1 10/2/2018 100 0
1 10/2/2018 90 1
1 9/7/2017 89 0
1 9/7/2017 94 1
1 9/72017 89 2
2 4/4/2016 130 0
2/ 4/4/2016 145 1
The expected dataset is as follows,
id date x0 x1 x2
1 10/2/2018 100 90
1 9/7/2017 89 94 89
2 4/4/2016 130 45
My current program is as follows,
proc transpose data=have out=want. prefix=x;
var bp;
by id date;
id time;
I want to transpose bp for each id and date but I could not obtain the expected dataset with this codes.
I have spent a lot of time, but I haven't reached the answer.