Hello,
When I do a two-way proc freq it doesn't show the two variable names above the freq table.
I never changed any of the setting on my SAS. Is there a way to bring them back?
EX.
The SAS System
The FREQ Procedure
Two-Way Table Output
Count |0-YES |1-NO | Total
--------+---------+---------+
0-YES | 6 | 2 | 8
--------+---------+---------+
1-NO | 2 | 56 | 58
--------+---------+---------+
Total 8 58 66
Under "Two-Way Table Output
" shouldn't I see the 2 variables names used?
Thank you
Do you know if anyone using your system has experimented or run example code for Proc Template to modify any table templates?
Try running this code:
proc template; source base.freq.crosstabfreqs; run;
A line at the bottom of the output should look like this:
NOTE: Path 'Base.Freq.Crosstabfreqs' is in: SASHELP.TMPLBASE (via SASHELP.TMPLMST).
If the path references somewhere else then likely someone ran something that created another template that is being used. The most likely alternate path would mention SASUSER.Templat. If that is the case we can use Proc Template to remove the altered template if that is what you need.
@jerry898969 wrote:
Hello,
When I do a two-way proc freq it doesn't show the two variable names above the freq table.
I never changed any of the setting on my SAS. Is there a way to bring them back?
EX.
The SAS System The FREQ Procedure Two-Way Table Output Count |0-YES |1-NO | Total --------+---------+---------+ 0-YES | 6 | 2 | 8 --------+---------+---------+ 1-NO | 2 | 56 | 58 --------+---------+---------+ Total 8 58 66
Under "
Two-Way Table Output
" shouldn't I see the 2 variables names used?
Thank you
Please show the code you are using. Since the displayed output is not a default two-way proc freq output we need to see all of the options you may have used.
I apologize for not posting the code.
This is the code :
proc freq data= _chk ;
tables Old*New / missing nocol norow nopercent ;
run ;
Thank you
Do you know if anyone using your system has experimented or run example code for Proc Template to modify any table templates?
Try running this code:
proc template; source base.freq.crosstabfreqs; run;
A line at the bottom of the output should look like this:
NOTE: Path 'Base.Freq.Crosstabfreqs' is in: SASHELP.TMPLBASE (via SASHELP.TMPLMST).
If the path references somewhere else then likely someone ran something that created another template that is being used. The most likely alternate path would mention SASUSER.Templat. If that is the case we can use Proc Template to remove the altered template if that is what you need.
Hi ballardw,
I ran this code and this is what it said in the log: NOTE: Path 'Base.Freq.Crosstabfreqs' is in: SASUSER.TEMPLAT.
proc template;
source base.freq.crosstabfreqs;
run;
1. I went to SAS and right-clicked on the word results in the result window and selected templates.
2. I clicked the "+" of Sasuser.Templat
3. I clicked the "+" of Base
4. Selected "Freq" and it had "CrossTabFreqs" so I renamed it to "_CrossTabFreqs" .
5. I re-ran my freq and now it shows the column names.
Thank you all for your help.
If you search the help for Proc Template there is an example that shows how to modify a procedure's table template, use that, and then remove the replaced template.
Good work on finding at least one manual way to correct the issue once identified.
I'm guessing that someone messed up the templates for PROC FREQ. Were you trying to customize the output in some manner?
To work around it for now, you can use PROC TABULATE which has very similar functionality for displaying information at least.
@jerry898969 wrote:
Hello,
When I do a two-way proc freq it doesn't show the two variable names above the freq table.
I never changed any of the setting on my SAS. Is there a way to bring them back?
EX.
The SAS System The FREQ Procedure Two-Way Table Output Count |0-YES |1-NO | Total --------+---------+---------+ 0-YES | 6 | 2 | 8 --------+---------+---------+ 1-NO | 2 | 56 | 58 --------+---------+---------+ Total 8 58 66
Under "
Two-Way Table Output
" shouldn't I see the 2 variables names used?
Thank you
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.