hi team,
in the past i had a similar question and Tom &others helped me .
That time it was transposing the below "have" dataset into a single record. But now i want the below data to transposed into WANT dataset having the 5 records like shown!!!
Thanks
/*aFTER SORTING MY DATASET BY :iD AND TIME I GET THE BELOW
"have"*/
ID      flag                        time          
101      TIMEIN     04SEP89:07:30:00    
101      TIMEIN     04SEP89:13:45:00   
101      TIMEOUT    05SEP89:07:15:00     
101      TIMEIN     21SEP89:17:55:00  
101      TIMEOUT    22SEP89:06:00:00
101      TIMEOUT    23SEP89:06:00:00
101      TIMEIN     24SEP89:06:00:00
/*WANT*/
ID                 timein                       timeout        
101           04SEP89:07:30:00          .   
101           04SEP89:13:45:00    05SEP89:07:15:00 
101           21SEP89:17:55:00    22SEP89:06:00:00
101                 .                           23SEP89:06:00:00
101           24SEP89:06:00:00           .
Seems like the main issue is how to group the in/out so that you can transpose. This is what I came up with but it may not work for anything but your test data.
Seems like the main issue is how to group the in/out so that you can transpose. This is what I came up with but it may not work for anything but your test data.
Thanks for the reply data_null_.
But why would it not work out of my test data?
Thanks
I said it MAY not.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.