<?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: N statistic for a character variable in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/N-statistic-for-a-character-variable/m-p/947081#M83686</link>
    <description>&lt;P&gt;Syntax should be the same.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=sashelp.class;
 class sex ;
 output out=want ;
run;
proc print;
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-1728613033009.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101130i359D630524F72059/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tom_0-1728613033009.png" alt="Tom_0-1728613033009.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Oct 2024 02:17:21 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2024-10-11T02:17:21Z</dc:date>
    <item>
      <title>N statistic for a character variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/N-statistic-for-a-character-variable/m-p/947067#M83683</link>
      <description>&lt;P&gt;HI y'all,&lt;/P&gt;&lt;P&gt;I know that there is a way to get either or both of PROC MEANS or PROC SUMMARY to give me a simple count of a character variable by a couple of CLASS variables.&amp;nbsp; I am pretty sure that before PROC MEANS and PROC SUMMARY basically became one and the same, that SUMMARY supported that, while MEANS did not.&amp;nbsp; but so far, my attempts to get this elusive number have been unsuccessful.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know how to do this?&amp;nbsp; I really do not want to resort to DATA step or PROC SQL.&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Donna&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 22:44:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/N-statistic-for-a-character-variable/m-p/947067#M83683</guid>
      <dc:creator>ddutton325</dc:creator>
      <dc:date>2024-10-10T22:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: N statistic for a character variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/N-statistic-for-a-character-variable/m-p/947068#M83684</link>
      <description>&lt;P&gt;PROC FREQ is the tool you want. It should be your first choice whenever you have to count things.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 23:14:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/N-statistic-for-a-character-variable/m-p/947068#M83684</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-10-10T23:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: N statistic for a character variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/N-statistic-for-a-character-variable/m-p/947081#M83686</link>
      <description>&lt;P&gt;Syntax should be the same.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=sashelp.class;
 class sex ;
 output out=want ;
run;
proc print;
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-1728613033009.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101130i359D630524F72059/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tom_0-1728613033009.png" alt="Tom_0-1728613033009.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2024 02:17:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/N-statistic-for-a-character-variable/m-p/947081#M83686</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-10-11T02:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: N statistic for a character variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/N-statistic-for-a-character-variable/m-p/947222#M83690</link>
      <description>&lt;P&gt;Try to get frequency through proc means:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc means data=sashelp.class n;&lt;BR /&gt;class name sex;&lt;BR /&gt;output out=means_out (DROP=_type_ _freq_ );&lt;/P&gt;&lt;P&gt;data means_out;&lt;BR /&gt;set means_out;&lt;BR /&gt;where _STAT_='N';&lt;BR /&gt;run;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bala_Saladi_0-1728768466473.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101163iAF1B6B3433682EE4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bala_Saladi_0-1728768466473.png" alt="Bala_Saladi_0-1728768466473.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Oct 2024 21:28:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/N-statistic-for-a-character-variable/m-p/947222#M83690</guid>
      <dc:creator>Bala_Saladi</dc:creator>
      <dc:date>2024-10-12T21:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: N statistic for a character variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/N-statistic-for-a-character-variable/m-p/947255#M83691</link>
      <description>&lt;P&gt;Use the TABLE statement in PROC FREQ. You can add the OUT= option if you need the counts in a data set.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=sashelp.class;
   table sex / out=FreqOut;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rick_SAS_0-1728811581632.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101174i4A7AA659CB583BB6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Rick_SAS_0-1728811581632.png" alt="Rick_SAS_0-1728811581632.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Oct 2024 09:26:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/N-statistic-for-a-character-variable/m-p/947255#M83691</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2024-10-13T09:26:28Z</dc:date>
    </item>
  </channel>
</rss>

