<?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 PROC MEANS/SUMMARY character variables in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/PROC-MEANS-SUMMARY-character-variables/m-p/598067#M16240</link>
    <description>&lt;P&gt;Hello every one,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;could you please tell me how to run a proc means/summary on character variiables:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc means data=x print missing n nmiss;&lt;/P&gt;
&lt;P&gt;var _CHARACTER_;&lt;/P&gt;
&lt;P&gt;ods output summary=y;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the above code is returning an error.&lt;/P&gt;</description>
    <pubDate>Mon, 21 Oct 2019 09:51:14 GMT</pubDate>
    <dc:creator>aloou</dc:creator>
    <dc:date>2019-10-21T09:51:14Z</dc:date>
    <item>
      <title>PROC MEANS/SUMMARY character variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/PROC-MEANS-SUMMARY-character-variables/m-p/598067#M16240</link>
      <description>&lt;P&gt;Hello every one,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;could you please tell me how to run a proc means/summary on character variiables:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc means data=x print missing n nmiss;&lt;/P&gt;
&lt;P&gt;var _CHARACTER_;&lt;/P&gt;
&lt;P&gt;ods output summary=y;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the above code is returning an error.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 09:51:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/PROC-MEANS-SUMMARY-character-variables/m-p/598067#M16240</guid>
      <dc:creator>aloou</dc:creator>
      <dc:date>2019-10-21T09:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MEANS/SUMMARY character variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/PROC-MEANS-SUMMARY-character-variables/m-p/598071#M16241</link>
      <description>&lt;P&gt;Please provide some sample input data in the form of a data step (as per&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank" rel="noopener"&gt;this&lt;/A&gt;&amp;nbsp;article) and also show the log containing the error message you have.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 10:35:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/PROC-MEANS-SUMMARY-character-variables/m-p/598071#M16241</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2019-10-21T10:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MEANS/SUMMARY character variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/PROC-MEANS-SUMMARY-character-variables/m-p/598073#M16242</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/232758"&gt;@aloou&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you want to use character variables to calculate statistics on categories?&lt;/P&gt;
&lt;P&gt;if so, you can add the "class" statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 10:38:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/PROC-MEANS-SUMMARY-character-variables/m-p/598073#M16242</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2019-10-21T10:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MEANS/SUMMARY character variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/PROC-MEANS-SUMMARY-character-variables/m-p/598077#M16243</link>
      <description>&lt;P&gt;You can't use char-variables in the var-statement.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 10:50:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/PROC-MEANS-SUMMARY-character-variables/m-p/598077#M16243</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-10-21T10:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MEANS/SUMMARY character variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/PROC-MEANS-SUMMARY-character-variables/m-p/598092#M16251</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/232758"&gt;@aloou&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;could you please tell me how to run a proc means/summary on character variiables:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Could you please tell us what you would like PROC MEANS or PROC SUMMARY to do with your character variables? You can't compute a mean of character variables. You can't compute a standard deviation. So what is the desired output of PROC MEANS or PROC SUMMARY (or any other procedure) from your character variables?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps you want to use PROC FREQ on character variables? PROC FREQ produces a count (and percent) of each level of your character variables.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 11:57:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/PROC-MEANS-SUMMARY-character-variables/m-p/598092#M16251</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-10-21T11:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MEANS/SUMMARY character variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/PROC-MEANS-SUMMARY-character-variables/m-p/598113#M16252</link>
      <description>&lt;P&gt;Usine SQL instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sql;
select n(sex) as n,nmiss(sex) as nmiss
 from sashelp.class;
quit;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Oct 2019 13:02:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/PROC-MEANS-SUMMARY-character-variables/m-p/598113#M16252</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-10-21T13:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MEANS/SUMMARY character variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/PROC-MEANS-SUMMARY-character-variables/m-p/598130#M16253</link>
      <description>&lt;P&gt;Mr Paige i hope that you are doing well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yess thats exactly what i want to do, count and percentage of char type variables.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 13:39:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/PROC-MEANS-SUMMARY-character-variables/m-p/598130#M16253</guid>
      <dc:creator>aloou</dc:creator>
      <dc:date>2019-10-21T13:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MEANS/SUMMARY character variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/PROC-MEANS-SUMMARY-character-variables/m-p/598135#M16254</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/232758"&gt;@aloou&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you should use PROC FREQ. Here is the basic syntax:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=have noprint;
   table var_char / out=want;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 13:47:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/PROC-MEANS-SUMMARY-character-variables/m-p/598135#M16254</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2019-10-21T13:47:29Z</dc:date>
    </item>
  </channel>
</rss>

