简体   繁体   中英

Formating proc freq output table in SAS

I have the following data

DATA HAVE;
input year dz area;
cards;
2000 1 08
2000 1 06
2000 1 06
;
run;

 

proc freq data=have;
table area*dz / norow nocol;
run;

I get the following output

Priyamvada07_0-1616740380414.png

I would like to format it to put frequency in one column and percent in another column and I don't want the total column. Is there a way to do it?

Thank you!

  1. Try adding the LIST option to get a different layout:

     proc freq data=have; table area*dz / norow nocol LIST; run;
  2. Pipe it to a data set and format as desired:

     proc freq data=have; table area*dz / norow nocol LIST out=want; run; proc print data=want;run;
  3. Use PROC TABULATE instead (not shown), which allows you more control over your layout and formats.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM