<?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 convert US height values in feet' inches&amp;quot; to numeric value? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-US-height-values-in-feet-inches-quot-to-numeric/m-p/127051#M25889</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the data consistently includes FEET value then you could use something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;data check;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;input charvar $10.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;inches = sum&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt; (12*input(scan(charvar,1,'"'''),5.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt; ,input(scan(charvar,2,'"'''),5.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;put (inches charvar) (=);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;cards;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;5' 8"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;4'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;inches=68 charvar=5' 8"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;inches=48 charvar=4'&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Jul 2013 20:40:14 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2013-07-04T20:40:14Z</dc:date>
    <item>
      <title>How to convert US height values in feet' inches" to numeric value?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-US-height-values-in-feet-inches-quot-to-numeric/m-p/127049#M25887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey there, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked around and I found a few suggestions such as &lt;A _jive_internal="true" href="https://communities.sas.com/thread/30121?start=0&amp;amp;tstart=0"&gt;https://communities.sas.com/thread/30121?start=0&amp;amp;tstart=0&lt;/A&gt;. However, I have a slightly different scenario and I cannot figure it out by myself. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The observations are saved in a SAS dataset in one char variable like 5' 10, 6' 4" ... etc. The problem I ran into most of the time were unbalanced quotation marks.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;The final goal is it to convert the data into a numeric value (total inches or cm) to open it up for numeric procs for better analysis. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Any suggestions are very much appreciated!bas&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jul 2013 18:47:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-US-height-values-in-feet-inches-quot-to-numeric/m-p/127049#M25887</guid>
      <dc:creator>Phill</dc:creator>
      <dc:date>2013-07-04T18:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert US height values in feet' inches" to numeric value?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-US-height-values-in-feet-inches-quot-to-numeric/m-p/127050#M25888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use KSharp's solution from the tread above but change your scan options, to reflect your data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probably work on getting the scan to work properly first is a good place to start.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jul 2013 19:26:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-US-height-values-in-feet-inches-quot-to-numeric/m-p/127050#M25888</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-07-04T19:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert US height values in feet' inches" to numeric value?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-US-height-values-in-feet-inches-quot-to-numeric/m-p/127051#M25889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the data consistently includes FEET value then you could use something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;data check;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;input charvar $10.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;inches = sum&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt; (12*input(scan(charvar,1,'"'''),5.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt; ,input(scan(charvar,2,'"'''),5.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;put (inches charvar) (=);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;cards;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;5' 8"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;4'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;inches=68 charvar=5' 8"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;inches=48 charvar=4'&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jul 2013 20:40:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-US-height-values-in-feet-inches-quot-to-numeric/m-p/127051#M25889</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-07-04T20:40:14Z</dc:date>
    </item>
  </channel>
</rss>

