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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.