Reputation: 35
I'm using proc freq in a Jupyter notebook but I don't want all the rows in the resulting frequency table to be displayed, only the first 10. I tried using (obs=10) but that just prints a frequency table using the first 10 observations in the data, which is not what I want.
Upvotes: 1
Views: 2715
Reputation: 63424
Not directly from PROC FREQ. You can do it in two steps:
One example:
proc freq data=sashelp.cars;
tables make;
run;
becomes
proc freq data=sashelp.cars noprint;
tables make/out=tbl_make;
run;
proc print data=tbl_make(obs=10) noobs;
run;
One highly recommended option is to add the order=freq
option to the proc freq statement as usually the higher frequencies are what you're interested in.
Upvotes: 1