I want to control the order of output so that the last row is first, the first row is second and the second row is third.
code:
proc freq data=four;
table lre_placement / nocum;
run;
output
Inside Reg Class 40-79% of day |
Inside Reg Class >80% of day |
Inside Reg Class <40% of day |
Add a white blank before last row.
data four;
set four;
if lre_placement='Inside Reg Class <40% of day' then lre_placement=' Inside Reg Class <40% of day';
run;
Please try the below code
proc freq data=four order=internal;
table lre_placement / nocum;
run;
Alternatively you can use the format to order
proc freq data=four order=formatted;
table lre_placement / nocum;
format lre_placement xformat.;
run;
Add a white blank before last row.
data four;
set four;
if lre_placement='Inside Reg Class <40% of day' then lre_placement=' Inside Reg Class <40% of day';
run;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.