<?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: Adding a condition in PROC FREQ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Adding-a-condition-in-PROC-FREQ/m-p/616730#M180600</link>
    <description>&lt;P&gt;If you don't need to worry about cumulative frequency, PROC FREQ can output the right numbers directly into a data set:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data= sashelp.cars;
   table type / noprint out=want (where=(count &amp;gt; 30));
run;
proc print data=want label;
   label count = 'Frequency';
   var type count;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 11 Jan 2020 23:12:40 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2020-01-11T23:12:40Z</dc:date>
    <item>
      <title>Adding a condition in PROC FREQ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-a-condition-in-PROC-FREQ/m-p/616631#M180531</link>
      <description>&lt;P&gt;Can I limit my PROC FREQ result to groups where there are more than 30 observations in the below code? In other words, I would like to just report the number of observations in&amp;nbsp;SUV, Sedan, and Sports groups, respectively, using PROC FREQ. In general, I would like to know how I can add a condition to limit my result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc freq data= sashelp.cars;
	table type/ nopercent nocol; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Freq: One-Way Frequencies" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="l b header" scope="col"&gt;Type&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Frequency&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Cumulative&lt;BR /&gt;Frequency&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Hybrid&lt;/TH&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;SUV&lt;/TH&gt;
&lt;TD class="r data"&gt;60&lt;/TD&gt;
&lt;TD class="r data"&gt;63&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Sedan&lt;/TH&gt;
&lt;TD class="r data"&gt;262&lt;/TD&gt;
&lt;TD class="r data"&gt;325&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Sports&lt;/TH&gt;
&lt;TD class="r data"&gt;49&lt;/TD&gt;
&lt;TD class="r data"&gt;374&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Truck&lt;/TH&gt;
&lt;TD class="r data"&gt;24&lt;/TD&gt;
&lt;TD class="r data"&gt;398&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Wagon&lt;/TH&gt;
&lt;TD class="r data"&gt;30&lt;/TD&gt;
&lt;TD class="r data"&gt;428&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 22:48:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-a-condition-in-PROC-FREQ/m-p/616631#M180531</guid>
      <dc:creator>braam</dc:creator>
      <dc:date>2020-01-10T22:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a condition in PROC FREQ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-a-condition-in-PROC-FREQ/m-p/616632#M180532</link>
      <description>&lt;P&gt;Not Sure directly on a PRINT output, but a workaround could be the following&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output  OneWayFreqs=want(where=(Frequency&amp;gt;30));
proc freq data= sashelp.cars ;
	table type/ nopercent nocol; run;

proc print noobs;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Jan 2020 23:11:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-a-condition-in-PROC-FREQ/m-p/616632#M180532</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-01-10T23:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a condition in PROC FREQ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-a-condition-in-PROC-FREQ/m-p/616634#M180533</link>
      <description>&lt;P&gt;And what should appear in the Cumulative Frequency column?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 22:57:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-a-condition-in-PROC-FREQ/m-p/616634#M180533</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2020-01-10T22:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a condition in PROC FREQ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-a-condition-in-PROC-FREQ/m-p/616669#M180558</link>
      <description>Oh, that column isn't needed.</description>
      <pubDate>Sat, 11 Jan 2020 11:15:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-a-condition-in-PROC-FREQ/m-p/616669#M180558</guid>
      <dc:creator>braam</dc:creator>
      <dc:date>2020-01-11T11:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a condition in PROC FREQ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-a-condition-in-PROC-FREQ/m-p/616730#M180600</link>
      <description>&lt;P&gt;If you don't need to worry about cumulative frequency, PROC FREQ can output the right numbers directly into a data set:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data= sashelp.cars;
   table type / noprint out=want (where=(count &amp;gt; 30));
run;
proc print data=want label;
   label count = 'Frequency';
   var type count;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2020 23:12:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-a-condition-in-PROC-FREQ/m-p/616730#M180600</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2020-01-11T23:12:40Z</dc:date>
    </item>
  </channel>
</rss>

