Usage Note 23350: How can I replace the variable's name with the
variable's label in PROC FREQ output?
In the output for a one-way frequency table, the variable's label, if one is specified, is centered at the
top of the table. If you want to use the variable's label instead of the name,
then use PROC TEMPLATE to edit the HEADER= value as shown in the example code below.
This modification does not currently work with crosstabulation output
from PROC FREQ.
proc template;
define table Base.Freq.OneWayFreqs ;
notes "One-Way Frequency table";
dynamic varjust page needlines plabel varlabel lw gluef gluep;
column Line FVariable FListVariable Variable Frequency TestFrequency
Percent TestPercent CumFrequency CumPercent;
header h1;
translate _val_=._ into "";
define FVariable;
header = varlabel;
just = varjust;
parent = Base.Freq.FVariable;
style = RowHeader;
id;
generic;
end;
edit h1;
/* set text to BLANK instead of VARLABEL */
text " ";
end;
parent = Base.Freq.OneWayList;
end;
run;
title;
ods listing;
proc freq data=sashelp.class;
label age='this is a label';
tables age;
run;
/* delete the customized table if desired */
proc template;
delete base.freq.onewayfreqs;
run;
See also the full SAS Notes and Concepts for ODS.
Operating System and Release Information
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Type: | Usage Note |
| Priority: | low |
| Topic: | Third Party ==> Output ==> HTML SAS Reference ==> ODS (Output Delivery System) SAS Reference ==> Procedures ==> FREQ
|
| Date Modified: | 2009-04-13 11:30:58 |
| Date Created: | 2003-08-08 16:45:36 |