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 name 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;
edit Base.Freq.OneWayFreqs;
edit h1;
text " ";
end;
edit FVariable;
just = varjust;
style = RowHeader;
id;
generic;
header=varlabel;
end;
end;
run;
data test;
input x y z;
cards;
205 06 1
204 05 2
205 06 3
205 01 4
205 03 6
204 02 2
204 06 1
204 03 5
. 03 5
204 . 8
;
proc freq data=test;
table x;
label x='this is a label';
run;
See also the full PROC TEMPLATE FAQ and Concepts.
Operating System and Release Information
| Product Family | Product | System | Reported Release | Fixed Release* |
| SAS System | Base SAS | All | n/a | |
*
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: | 2007-10-04 16:13:35 |
| Date Created: | 2003-08-08 16:45:36 |