data i;
input
ID Year Name $;
datalines;
1 1990 Bob
1 1991 Ken
1 1997 Cindy
1 1998 Will
2 1990 Jack
2 1991 Frank
2 1992 Mindy
run;
proc sort data=i;
by id year;
run;
proc sql;
create table
temp as
select
id,year
from (select distinct id from
i),(select distinct
year from i)
order by id,year;
quit;
data _temp;
merge i temp;
by id year;
run;
proc transpose data=_temp out=result(drop=_name_) prefix=_;
by id;
id year;
var name;
run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.