<?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: Creating a new categorical variable for which variables 1 and 2 contain text in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-new-categorical-variable-for-which-variables-1-and-2/m-p/675740#M36679</link>
    <description>&lt;P&gt;Then you would check if the code was 0 rather than missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/341083"&gt;@advmsj&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Check if the second column is missing, if it is, use Column1, otherwise set it to Mixed.&lt;BR /&gt;&lt;BR /&gt;if missing(column2) then desired_column = column1;&lt;BR /&gt;else desired_column = 'Mixed';&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Thank for you this solution. What the missingness in column 2 is denoted with a 0. How does the code change?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Aug 2020 20:04:54 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-08-10T20:04:54Z</dc:date>
    <item>
      <title>Creating a new categorical variable for which variables 1 and 2 contain text</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-new-categorical-variable-for-which-variables-1-and-2/m-p/675733#M36676</link>
      <description>&lt;P&gt;Hi there, I am trying to find a way to create a categorical variable in which:&lt;/P&gt;&lt;P&gt;1 = Mixed (given there is text in both columns 1 and 2)&lt;/P&gt;&lt;P&gt;2 = Unknown&lt;/P&gt;&lt;P&gt;3 = Purebred type 1&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;n = Purebred type n&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Given the sample dataset:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Column 1 - Breed 1&lt;/TD&gt;&lt;TD&gt;Column 2 - Breed 2&lt;/TD&gt;&lt;TD&gt;Desired Column&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Poodle&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Purebred - Poodle&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Poodle&lt;/TD&gt;&lt;TD&gt;Husky&lt;/TD&gt;&lt;TD&gt;Mixed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Husky&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Purebred - Husky&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;Maltese&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Purebred - Maltese&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;Poodle&lt;/TD&gt;&lt;TD&gt;Maltese&lt;/TD&gt;&lt;TD&gt;Mixed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;Unknown&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Unknown&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;Golden Retriever&lt;/TD&gt;&lt;TD&gt;Poodle&lt;/TD&gt;&lt;TD&gt;Mixed&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Mon, 10 Aug 2020 19:30:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-new-categorical-variable-for-which-variables-1-and-2/m-p/675733#M36676</guid>
      <dc:creator>advmsj</dc:creator>
      <dc:date>2020-08-10T19:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new categorical variable for which variables 1 and 2 contain text</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-new-categorical-variable-for-which-variables-1-and-2/m-p/675735#M36677</link>
      <description>Check if the second column is missing, if it is, use Column1, otherwise set it to Mixed.&lt;BR /&gt;&lt;BR /&gt;if missing(column2) then desired_column = column1;&lt;BR /&gt;else desired_column = 'Mixed';</description>
      <pubDate>Mon, 10 Aug 2020 19:41:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-new-categorical-variable-for-which-variables-1-and-2/m-p/675735#M36677</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-08-10T19:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new categorical variable for which variables 1 and 2 contain text</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-new-categorical-variable-for-which-variables-1-and-2/m-p/675736#M36678</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Check if the second column is missing, if it is, use Column1, otherwise set it to Mixed.&lt;BR /&gt;&lt;BR /&gt;if missing(column2) then desired_column = column1;&lt;BR /&gt;else desired_column = 'Mixed';&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Thank for you this solution. What the missingness in column 2 is denoted with a 0. How does the code change?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 19:43:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-new-categorical-variable-for-which-variables-1-and-2/m-p/675736#M36678</guid>
      <dc:creator>advmsj</dc:creator>
      <dc:date>2020-08-10T19:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new categorical variable for which variables 1 and 2 contain text</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-new-categorical-variable-for-which-variables-1-and-2/m-p/675740#M36679</link>
      <description>&lt;P&gt;Then you would check if the code was 0 rather than missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/341083"&gt;@advmsj&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Check if the second column is missing, if it is, use Column1, otherwise set it to Mixed.&lt;BR /&gt;&lt;BR /&gt;if missing(column2) then desired_column = column1;&lt;BR /&gt;else desired_column = 'Mixed';&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Thank for you this solution. What the missingness in column 2 is denoted with a 0. How does the code change?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 20:04:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-a-new-categorical-variable-for-which-variables-1-and-2/m-p/675740#M36679</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-08-10T20:04:54Z</dc:date>
    </item>
  </channel>
</rss>

