<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: proc means - variable label on statistics in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846237#M334553</link>
    <description>Just add this option&lt;BR /&gt;options nolabel;&lt;BR /&gt;at the top of your code.&lt;BR /&gt;</description>
    <pubDate>Fri, 25 Nov 2022 01:34:31 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2022-11-25T01:34:31Z</dc:date>
    <item>
      <title>proc means - variable label on statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846129#M334497</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The attrib/label statement will only remove the labels of the input variable but not of the statistics computed with proc means.&lt;/P&gt;
&lt;P&gt;Is there any option which could&amp;nbsp; be used to avoid an extra data step/proc datasets?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the example, the N Obs label is first added on the computed nobs variable, and so on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods exclude all;
ods output summary=test;

proc means data=sashelp.class ;
    class sex;&lt;BR /&gt;&lt;BR /&gt;    var height;
    *attrib _all_ label=' ';
run;
ods exclude none;

proc print data=test label noobs;
run;

proc datasets lib=work nolist;
   modify test;
   attrib _all_ label=' ';
   run;
quit;

proc print data=test label noobs;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 12:43:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846129#M334497</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2022-11-24T12:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: proc means - variable label on statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846130#M334498</link>
      <description>&lt;P&gt;What is the real objective here? To create a report with no labels or to create a data set with statistics with no labels?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 12:40:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846130#M334498</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-11-24T12:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: proc means - variable label on statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846131#M334499</link>
      <description>statistics with no label.</description>
      <pubDate>Thu, 24 Nov 2022 12:43:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846131#M334499</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2022-11-24T12:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: proc means - variable label on statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846136#M334502</link>
      <description>&lt;P&gt;In a data set or a report?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 13:04:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846136#M334502</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-11-24T13:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: proc means - variable label on statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846166#M334525</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/184742"&gt;@xxformat_com&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;statistics with no label.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please be kind and explain why you want this. Should you achieve this "statistics with no label", what would you do with the resulting statistics with no label, that requires no label and would not work properly if there is a label?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe that the default label for variables is the variable name.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 15:18:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846166#M334525</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-11-24T15:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: proc means - variable label on statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846188#M334535</link>
      <description>&lt;P&gt;I really don't understand what the issue is.&amp;nbsp; If you don't want to print the labels then don't print the labels.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=test noobs;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or just skip using ODS output and instead use the OUTPUT statement to generate a dataset.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That dataset does not add labels.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1669305329006.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77678iB86E9A6060BACE11/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tom_0-1669305329006.png" alt="Tom_0-1669305329006.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can also make a wider dataset.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=sashelp.class nolabels;
  class sex;    var height;
  output out=stats;
  output out=stats_wide n= min= max= mean= std= / autoname ; 
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1669313081367.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77679i157AB02A1421DA57/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tom_0-1669313081367.png" alt="Tom_0-1669313081367.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 18:04:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846188#M334535</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-11-24T18:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: proc means - variable label on statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846194#M334541</link>
      <description>no variable label in the dataset as given in the example.</description>
      <pubDate>Thu, 24 Nov 2022 17:07:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846194#M334541</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2022-11-24T17:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: proc means - variable label on statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846197#M334543</link>
      <description>&lt;P&gt;And what will you do with the dataset?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 17:37:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846197#M334543</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-11-24T17:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: proc means - variable label on statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846198#M334544</link>
      <description>&lt;P&gt;Well, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/184742"&gt;@xxformat_com&lt;/a&gt; , you have been asked several times for explanation about what you will do with this "statistic with no label" once you have it. Please provide the answer.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 17:43:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846198#M334544</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-11-24T17:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: proc means - variable label on statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846207#M334547</link>
      <description>SAS adds variable labels by default. To remove them you can modify the template (which would affect every time you run PROC MEANS), remove them after in the saved dataset using a variety of methods (proc dataset, data step), or ensure the following procedures use variable names not labels. Or explicitly calculate your statistics in a more manual fashion such as proc sql or tabulate where you can control the labels. &lt;BR /&gt;</description>
      <pubDate>Thu, 24 Nov 2022 18:29:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846207#M334547</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-11-24T18:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: proc means - variable label on statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846237#M334553</link>
      <description>Just add this option&lt;BR /&gt;options nolabel;&lt;BR /&gt;at the top of your code.&lt;BR /&gt;</description>
      <pubDate>Fri, 25 Nov 2022 01:34:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/846237#M334553</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-11-25T01:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: proc means - variable label on statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/847127#M334924</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt; Actually no. Here is an example showing that using the global option is not helping:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nolabel;
ods exclude all;
ods output summary=test;

proc means data=sashelp.class ;
    class sex;    var height;
    attrib _all_ label=' ';
run;
ods exclude none;
options label;

proc sql;
    select name, format, label
    from dictionary.columns
    where upcase(libname)='WORK' and
          upcase(memname)='TEST';
quit;

proc print data=test label noobs;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Nov 2022 18:59:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/847127#M334924</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2022-11-30T18:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: proc means - variable label on statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/847128#M334925</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/82368"&gt;@tomy&lt;/a&gt;&amp;nbsp;Actually I was not expecting any difference between ods output statement and the output statement.&lt;/P&gt;
&lt;P&gt;I'm really surprise that &lt;STRONG&gt;both label and format&lt;/STRONG&gt; are added to output datasets by default without any possibility to avoid them upfront.&lt;/P&gt;
&lt;P&gt;I don't see as beneficially to have to go back to old syntax because of that or add additional steps.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 19:02:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/847128#M334925</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2022-11-30T19:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: proc means - variable label on statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/847129#M334926</link>
      <description>&lt;P&gt;It is normally much better to use the datasets that a procedure can generate.&amp;nbsp; They are designed to used as data.&amp;nbsp; The stuff you can capture via ODS is stuff that is designed to be a REPORT.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 19:10:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/847129#M334926</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-11-30T19:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: proc means - variable label on statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/847165#M334948</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/184742"&gt;@xxformat_com&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt; Actually no. Here is an example showing that using the global option is not helping:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nolabel;
ods exclude all;
ods output summary=test;

proc means data=sashelp.class ;
    class sex;    var height;
    attrib _all_ label=' ';
run;
ods exclude none;
options label;

proc sql;
    select name, format, label
    from dictionary.columns
    where upcase(libname)='WORK' and
          upcase(memname)='TEST';
quit;

proc print data=test label noobs;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That actually doesn't "prove" what you may think. Since you are using ODS OUTPUT to create a data set then the rules imposed by that process, ods output, apply which is providing a column heading which makes a lot of sense with the multiple variables that are supported in column with ODS output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Consider&lt;/P&gt;
&lt;PRE&gt;options nolabel;
ods select all;
proc summary data=sashelp.class nway ;
    class sex;    
    var height;
    output out=test2 min= max= std= /autoname;
   
run;

options label;
proc sql;
    select name, format, label
    from dictionary.columns
    where upcase(libname)='WORK' and
          upcase(memname)='TEST2';
quit;&lt;BR /&gt;proc print data=test2 label;&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;The output data set here does not have any "label". SAS will use the variable name as a label when not provided or the option NOLABEL is set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc summary calculates all the same statistics as means and creates data sets. In fact for many years Means did not create sets, just print output, and Summary created sets but no print output. The two have been merged and have some slightly different default behaviors to be consistent will older output. The output statement has the AUTOLABEL option to force adding the statistic text to the existing variable label or variable name if not present.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 22:06:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/847165#M334948</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-11-30T22:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: proc means - variable label on statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/847204#M334963</link>
      <description>&lt;P&gt;Since you have already add options nolable;&lt;/P&gt;
&lt;P&gt;there is no need to add LABEL option in PROC PRINT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc print data=test label noobs;
run;
-------&amp;gt;
proc print data=test  noobs;
run;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1669879910582.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77896i61829F799DE172F8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1669879910582.png" alt="Ksharp_0-1669879910582.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 07:31:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/847204#M334963</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-12-01T07:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: proc means - variable label on statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/847207#M334964</link>
      <description>&lt;P&gt;options nolabel ;&lt;/P&gt;
&lt;P&gt;is just suppress the label ,not remove it .&lt;/P&gt;
&lt;P&gt;If you want remove it .&lt;/P&gt;
&lt;P&gt;I am afraid you need some other code :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output summary=test;
proc means data=sashelp.class ;
    class sex;    var height;
run;
ods exclude none;



proc datasets library=work nolist nodetails;
modify test;
attrib _all_ label=' ';
quit;




proc sql;
    select name, format, label
    from dictionary.columns
    where upcase(libname)='WORK' and
          upcase(memname)='TEST';
quit;

proc print data=test label noobs;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1669880490508.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77897i9416F387E91C76C7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1669880490508.png" alt="Ksharp_0-1669880490508.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 07:41:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-variable-label-on-statistics/m-p/847207#M334964</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-12-01T07:41:40Z</dc:date>
    </item>
  </channel>
</rss>

