<?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: Formating proc freq output table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Formating-proc-freq-output-table/m-p/729301#M226935</link>
    <description>&lt;P&gt;Thank you, proc tabulate does the work but only for numeric variables. Can I use proc tabulate to get similar output if one of the variables is a character variable?&lt;/P&gt;&lt;P&gt;DATA HAVE;&lt;BR /&gt;input year dz $8. area;&lt;BR /&gt;cards;&lt;BR /&gt;2000 stroke 08&lt;BR /&gt;2000 stroke 06&lt;BR /&gt;2000 stroke 06&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when I use the code provided, it gives me: ERROR: Variable dz in list does not match type prescribed for this list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Fri, 26 Mar 2021 07:33:06 GMT</pubDate>
    <dc:creator>Priyamvada07</dc:creator>
    <dc:date>2021-03-26T07:33:06Z</dc:date>
    <item>
      <title>Formating proc freq output table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formating-proc-freq-output-table/m-p/729294#M226932</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I have the following data&lt;/P&gt;&lt;P&gt;DATA HAVE;&lt;BR /&gt;input year dz area;&lt;BR /&gt;cards;&lt;BR /&gt;2000 1 08&lt;BR /&gt;2000 1 06&lt;BR /&gt;2000 1 06&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc freq data=have;&lt;BR /&gt;table area*dz / norow nocol;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the following output&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Priyamvada07_0-1616740380414.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56538i9C0E2492A053A35D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Priyamvada07_0-1616740380414.png" alt="Priyamvada07_0-1616740380414.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I would like to format it to put frequency in one column and percent in another column (and I don't want the total column) rather than the default SAS output. Is there a way to do it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 06:35:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formating-proc-freq-output-table/m-p/729294#M226932</guid>
      <dc:creator>Priyamvada07</dc:creator>
      <dc:date>2021-03-26T06:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Formating proc freq output table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formating-proc-freq-output-table/m-p/729295#M226933</link>
      <description>&lt;P&gt;I don't know how to get the expected output with proc freq. Proc tabulate could be used:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=have;
   class area;
   var dz;

   table area, dz*(n colpctn);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Mar 2021 06:51:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formating-proc-freq-output-table/m-p/729295#M226933</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-03-26T06:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: Formating proc freq output table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formating-proc-freq-output-table/m-p/729301#M226935</link>
      <description>&lt;P&gt;Thank you, proc tabulate does the work but only for numeric variables. Can I use proc tabulate to get similar output if one of the variables is a character variable?&lt;/P&gt;&lt;P&gt;DATA HAVE;&lt;BR /&gt;input year dz $8. area;&lt;BR /&gt;cards;&lt;BR /&gt;2000 stroke 08&lt;BR /&gt;2000 stroke 06&lt;BR /&gt;2000 stroke 06&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when I use the code provided, it gives me: ERROR: Variable dz in list does not match type prescribed for this list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 07:33:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formating-proc-freq-output-table/m-p/729301#M226935</guid>
      <dc:creator>Priyamvada07</dc:creator>
      <dc:date>2021-03-26T07:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Formating proc freq output table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formating-proc-freq-output-table/m-p/729332#M226941</link>
      <description>&lt;P&gt;Just move dz from the var statement into the class statement and remove the empty var statement.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 10:01:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formating-proc-freq-output-table/m-p/729332#M226941</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-03-26T10:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Formating proc freq output table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formating-proc-freq-output-table/m-p/729420#M226976</link>
      <description>&lt;P&gt;You can use the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=procstat&amp;amp;docsetTarget=procstat_freq_syntax08.htm&amp;amp;locale=en#procstat.freq.freqlist" target="_self"&gt;LIST&lt;/A&gt; option in PROC FREQ.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=have;
tables area * dz / list nocum;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=procstat&amp;amp;docsetTarget=procstat_freq_syntax08.htm&amp;amp;locale=en#procstat.freq.freqnocum" target="_self"&gt;NOCUM&lt;/A&gt; option suppresses the cumulative frequencies and percents.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 15:21:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formating-proc-freq-output-table/m-p/729420#M226976</guid>
      <dc:creator>Watts</dc:creator>
      <dc:date>2021-03-26T15:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Formating proc freq output table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formating-proc-freq-output-table/m-p/730192#M227354</link>
      <description>Hi! I just realized when using proc tabulate I am missing the last row that is the 'total' as seen in my output image in the original question. Is there a way to retain the 'total' column?</description>
      <pubDate>Tue, 30 Mar 2021 20:08:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formating-proc-freq-output-table/m-p/730192#M227354</guid>
      <dc:creator>Priyamvada07</dc:creator>
      <dc:date>2021-03-30T20:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: Formating proc freq output table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formating-proc-freq-output-table/m-p/730193#M227355</link>
      <description>Hi! I just realized when using this code I am missing the last row that is the 'total' as seen in my output image in the original question. Is there a way to retain the 'total' column?</description>
      <pubDate>Tue, 30 Mar 2021 20:10:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formating-proc-freq-output-table/m-p/730193#M227355</guid>
      <dc:creator>Priyamvada07</dc:creator>
      <dc:date>2021-03-30T20:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Formating proc freq output table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formating-proc-freq-output-table/m-p/730308#M227389</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/282708"&gt;@Priyamvada07&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi! I just realized when using proc tabulate I am missing the last row that is the 'total' as seen in my output image in the original question. Is there a way to retain the 'total' column?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, of course using the "all" keyword in the tables-statement. Can't test it now, but the following code should work.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=have;
   class area;
   var dz;

   table area all, dz*(n colpctn);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Mar 2021 06:28:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formating-proc-freq-output-table/m-p/730308#M227389</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-03-31T06:28:42Z</dc:date>
    </item>
  </channel>
</rss>

