<?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: How to rename a cell if it has a low frequency in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-rename-a-cell-if-it-has-a-low-frequency/m-p/415696#M101985</link>
    <description>&lt;P&gt;Your question is vague, so you’re going to get vague responses. If you have a fairly specific question with sample input/output data it’s easier to help you out.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don’t have to type out a format manually, it can be data driven and you can use a CNTLIN dataset to specify the formats.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Nov 2017 22:13:32 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-11-22T22:13:32Z</dc:date>
    <item>
      <title>How to rename a cell if it has a low frequency</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-rename-a-cell-if-it-has-a-low-frequency/m-p/415677#M101975</link>
      <description>&lt;P&gt;In a specific column I have many repeated informations like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;red&lt;/P&gt;&lt;P&gt;blue&lt;/P&gt;&lt;P&gt;yellow&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;white&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;red&lt;/P&gt;&lt;P&gt;blue&lt;/P&gt;&lt;P&gt;yellow&lt;/P&gt;&lt;P&gt;red&lt;/P&gt;&lt;P&gt;blue&lt;/P&gt;&lt;P&gt;yellow&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thought how&amp;nbsp;could&amp;nbsp;proceed to rename a cell when it has a low frequency?&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the sample&amp;nbsp;above I would like to rename&amp;nbsp; white as other since it has frequency 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 21:43:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-rename-a-cell-if-it-has-a-low-frequency/m-p/415677#M101975</guid>
      <dc:creator>Giovani</dc:creator>
      <dc:date>2017-11-22T21:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename a cell if it has a low frequency</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-rename-a-cell-if-it-has-a-low-frequency/m-p/415691#M101983</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try a FORMAT with Other category.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anything not in the main list will fall into the OTHER category, similar to a default ELSE.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 22:07:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-rename-a-cell-if-it-has-a-low-frequency/m-p/415691#M101983</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-22T22:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename a cell if it has a low frequency</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-rename-a-cell-if-it-has-a-low-frequency/m-p/415692#M101984</link>
      <description>&lt;P&gt;The spreadsheet has more then 100.000 lines and over 200 different variables. Any thought how could build the format code?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 22:10:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-rename-a-cell-if-it-has-a-low-frequency/m-p/415692#M101984</guid>
      <dc:creator>Giovani</dc:creator>
      <dc:date>2017-11-22T22:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename a cell if it has a low frequency</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-rename-a-cell-if-it-has-a-low-frequency/m-p/415696#M101985</link>
      <description>&lt;P&gt;Your question is vague, so you’re going to get vague responses. If you have a fairly specific question with sample input/output data it’s easier to help you out.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don’t have to type out a format manually, it can be data driven and you can use a CNTLIN dataset to specify the formats.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 22:13:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-rename-a-cell-if-it-has-a-low-frequency/m-p/415696#M101985</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-22T22:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename a cell if it has a low frequency</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-rename-a-cell-if-it-has-a-low-frequency/m-p/415700#M101989</link>
      <description>&lt;P&gt;I put a sample in the attached .sas file.&lt;/P&gt;&lt;P&gt;I think is more clear. If not please let me know&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 22:26:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-rename-a-cell-if-it-has-a-low-frequency/m-p/415700#M101989</guid>
      <dc:creator>Giovani</dc:creator>
      <dc:date>2017-11-22T22:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename a cell if it has a low frequency</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-rename-a-cell-if-it-has-a-low-frequency/m-p/415867#M102072</link>
      <description>&lt;P&gt;It helps if you post directly into the forum, not everyone can download files. You'll get answers faster.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*Sample data;
data Colours;
input colour$;
cards;
Blue
Yellow
Red
Yellow
Orange
Orange
Yellow
Orange
Blue
Gray
Orange
Yellow
White
Orange
Blue
White
White
Blue
Orange
White
Orange
Yellow
White
Blue
Orange
Yellow
Yellow
Orange
Orange
Yellow
;;;;
run;

*create table to create format;
proc freq data=Colours order=freq noprint;
    table colour / out=format_base;
run;

*create rules for format;
data colour_fmt;
    set format_base;

    length start label $20.;

    fmtname = 'colours_fmt';
    type='C';
    start=colour;

    if count &amp;lt;5 then label='Other';
        else label=colour;
run;

*create format;
proc format cntlin=colour_fmt;
run;

*Apply format;
proc freq data=colours order=freq;
table colour;
format colour $colours_fmt.;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Nov 2017 16:29:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-rename-a-cell-if-it-has-a-low-frequency/m-p/415867#M102072</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-23T16:29:11Z</dc:date>
    </item>
  </channel>
</rss>

