Hello, I am trying to create table using proc transpose to generate the things below. I dont know how to just convert the CODE to horizen but still fits the application_number and action and also the appstatusdate will change with it. If anyone could help, I will appreciate that. Thanks.
Could be as simple as:
proc transpose data=have out=want(drop=_name_) prefix=code;
by APPLICATION_NUMBER APPSTATUSDATE ACTION notsorted;
var CODE;
run;
proc sort data=have; by application_numbar appstatusdate action code; run;
data want;
set have;
by application_numbar appstatusdate action;
length code1 code2 $1;
retain code1 code2;
if first.action then do;
code1=' '; code2=' ';
end;
if code='f' then code1=code;
if code='s' then code2=code;
if last.action then output;
run;
How do you identify a 'group' or know that the two rows go together?
Please post a machine readable version of your data. Can't do any processing on a picture of your data.
hope to change different code to a new column. thanks
Could be as simple as:
proc transpose data=have out=want(drop=_name_) prefix=code;
by APPLICATION_NUMBER APPSTATUSDATE ACTION notsorted;
var CODE;
run;
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.