<?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: Converting Names into Number in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Converting-Names-into-Number/m-p/838284#M41509</link>
    <description>&lt;P&gt;If I am understanding you properly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;newvariable = missing(last_name);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 12 Oct 2022 18:51:01 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-10-12T18:51:01Z</dc:date>
    <item>
      <title>Converting Names into Number</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Converting-Names-into-Number/m-p/838283#M41508</link>
      <description>&lt;P&gt;I am trying to convert all last names of a patient to the number 0. Writing out each last name is not realistic as I have over 2 million last names. Is there a way to do this? I am trying to recode names present to 0 and missing to 1.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 18:49:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Converting-Names-into-Number/m-p/838283#M41508</guid>
      <dc:creator>brownster</dc:creator>
      <dc:date>2022-10-12T18:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Names into Number</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Converting-Names-into-Number/m-p/838284#M41509</link>
      <description>&lt;P&gt;If I am understanding you properly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;newvariable = missing(last_name);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Oct 2022 18:51:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Converting-Names-into-Number/m-p/838284#M41509</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-10-12T18:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Names into Number</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Converting-Names-into-Number/m-p/838286#M41510</link>
      <description>&lt;P&gt;If you want to do something like missing nonmissing you do not need to convert anything.&lt;/P&gt;
&lt;P&gt;In a data step&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MissingName = missing(yournamevariable);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;will create a new variable named MissingName and if the variable is missing, i.e. blank, then will be assigned the value of 1 and 0 otherwise. Missing is one of the functions that works with both character and numeric variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to overwrite the value in the name then you convert the result to text using the PUt function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;name = put(missing(name),1. );&lt;/P&gt;
&lt;P&gt;The format 1. means just use one character for the result so&amp;nbsp; the value will be in the first column of the name variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 18:56:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Converting-Names-into-Number/m-p/838286#M41510</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-10-12T18:56:36Z</dc:date>
    </item>
  </channel>
</rss>

