Hello SAS users. Below of an extract of what I am working at the moment.
data test;
input score;
cards;
9125
9455
;
run;
ODS RTF style=Journal BODYTITLE;
ODS NOPROCTITLE;
PROC freq DATA=test;
TABLES score / nocol norow nopercent;
RUN;
ODS RTF CLOSE;
While I want to keep the Journal style, I would like to;
- be able to manipulate column width so that I get more spaced out table hence easier to read
- put a comma after every 3 digits for the score
- put a total row at the bottom
Anyone has an idea?
Many thanks
I think Cynthia@sas can use proc template to tailor it .
But you can always use proc report to customize the output .
data test; input score; cards; 9125 9455 ; run; ods output OneWayFreqs=x; PROC freq DATA=test ; TABLES score / nocol norow nopercent; RUN; ODS RTF style=Journal BODYTITLE; ODS NOPROCTITLE; title ' '; proc report data=x(drop= f_:) out=p nowd; column table score frequency cumfrequency; define table/display style={cellwidth=2cm} ' '; define score /analysis format=comma10. style={cellwidth=2cm}; compute score; if _break_='_RBREAK_' then table='Total:'; else call missing(table); endcomp; rbreak after /summarize ; run; ODS RTF CLOSE;
Ksharp
I think Cynthia@sas can use proc template to tailor it .
But you can always use proc report to customize the output .
data test; input score; cards; 9125 9455 ; run; ods output OneWayFreqs=x; PROC freq DATA=test ; TABLES score / nocol norow nopercent; RUN; ODS RTF style=Journal BODYTITLE; ODS NOPROCTITLE; title ' '; proc report data=x(drop= f_:) out=p nowd; column table score frequency cumfrequency; define table/display style={cellwidth=2cm} ' '; define score /analysis format=comma10. style={cellwidth=2cm}; compute score; if _break_='_RBREAK_' then table='Total:'; else call missing(table); endcomp; rbreak after /summarize ; run; ODS RTF CLOSE;
Ksharp
Take a look at: http://support.sas.com/resources/papers/freq92.pdf
It has a number of examples regarding how to change the appearance of proc freq output.
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.