/* test data */
data one;
length c $2 n 8;
input c @@;
n = input(c, best.);
cards;
0 1 11 2 22 3 33 4 44
;
run;
/* a view that right aligns character vars */
data two/view=two;
set one;
array cs _character_;
do over cs;
cs = right(cs);
end;
run;
proc freq data=two;
run;
/* on lst
Cumulative Cumulative
c Frequency Percent Frequency Percent
-------------------------------------------------------
0 1 11.11 1 11.11
1 1 11.11 2 22.22
2 1 11.11 3 33.33
3 1 11.11 4 44.44
4 1 11.11 5 55.56
11 1 11.11 6 66.67
22 1 11.11 7 77.78
33 1 11.11 8 88.89
44 1 11.11 9 100.00
Cumulative Cumulative
n Frequency Percent Frequency Percent
-------------------------------------------------------
0 1 11.11 1 11.11
1 1 11.11 2 22.22
2 1 11.11 3 33.33
3 1 11.11 4 44.44
4 1 11.11 5 55.56
11 1 11.11 6 66.67
22 1 11.11 7 77.78
33 1 11.11 8 88.89
44 1 11.11 9 100.00
*/
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.