Sample 42561: New option to suppress variable labels in PROC MEANS
This sample demonstrates how to use the new NOLABELS option with PROC MEANS to suppress variable labels. This option will temporarily suppress variable labels that are associated with variables in the data set being processed by PROC MEANS. The variable labels are still available for use when the NOLABELS option is removed from the PROC MEANS statement and with other procedures.
The system option NOLABEL will suppress both variable labels and class labels. For example:
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample illustrates how to suppress the variable labels using the new NOLABELS option with PROC MEANS.
/* PROC MEANS without the NOLABELS option. */
proc means data=sashelp.shoes maxdec=2;
var sales returns;
run;
/* PROC MEANS with the NOLABELS option */
/* to suppress the variable labels. */
proc means data=sashelp.shoes maxdec=2 nolabels;
var sales returns;
run;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
The MEANS procedure output before applying the NOLABELS option:
The MEANS Procedure
Variable Label N Mean Std Dev Minimum
-----------------------------------------------------------------------------
Sales Total Sales 395 85700.17 129107.23 325.00
Returns Total Returns 395 2967.32 4611.74 10.00
-----------------------------------------------------------------------------
Variable Label Maximum
-----------------------------------------------------------------------------
Sales Total Sales 1298717.00
Returns Total Returns 57362.00
-----------------------------------------------------------------------------
The MEANS procedure output with the NOLABELS option applied:
The MEANS Procedure
Variable N Mean Std Dev Minimum Maximum
---------------------------------------------------------------------------------
Sales 395 85700.17 129107.23 325.00 1298717.00
Returns 395 2967.32 4611.74 10.00 57362.00
---------------------------------------------------------------------------------
The new NOLABELS option added to PROC MEANS in SAS® 9.2 suppresses variable labels.
Date Modified: | 2011-03-04 11:23:24 |
Date Created: | 2011-03-01 14:18:17 |
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.21 | | 9.2 TS2M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.21 | | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.21 | | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.21 | | 9.2 TS2M0 | |
Microsoft Windows XP 64-bit Edition | 9.21 | | 9.2 TS2M0 | |
Microsoft® Windows® for x64 | 9.21 | | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.21 | | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.21 | | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.21 | | 9.2 TS2M0 | |
Microsoft Windows Server 2003 for x64 | 9.21 | | 9.2 TS2M0 | |
Microsoft Windows Server 2008 for x64 | 9.21 | | 9.2 TS2M0 | |
Microsoft Windows XP Professional | 9.21 | | 9.2 TS2M0 | |
Windows Vista | 9.21 | | 9.2 TS2M0 | |
Windows Vista for x64 | 9.21 | | 9.2 TS2M0 | |
64-bit Enabled AIX | 9.21 | | 9.2 TS2M0 | |
64-bit Enabled HP-UX | 9.21 | | 9.2 TS2M0 | |
64-bit Enabled Solaris | 9.21 | | 9.2 TS2M0 | |
HP-UX IPF | 9.21 | | 9.2 TS2M0 | |
Linux | 9.21 | | 9.2 TS2M0 | |
Linux for x64 | 9.21 | | 9.2 TS2M0 | |
OpenVMS on HP Integrity | 9.21 | | 9.2 TS2M0 | |
Solaris for x64 | 9.21 | | 9.2 TS2M0 | |