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.
Calling all data scientists and open-source enthusiasts! Want to solve real problems that impact your company or the world? Register to hack by August 31st!
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.