<?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: conversion from character to numeric in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163843#M1576</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, the INPUT function is not supported in SAS/IML.&amp;nbsp; However, you can use the INPUTN format like this:&lt;/P&gt;&lt;P&gt;ijn = inputn(ij, "Best6.");&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Sep 2014 14:47:18 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2014-09-29T14:47:18Z</dc:date>
    <item>
      <title>conversion from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163834#M1567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have number like 11 in character form now I have to convert it in numeric number, how can I do this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2014 08:42:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163834#M1567</guid>
      <dc:creator>Rasheed</dc:creator>
      <dc:date>2014-09-29T08:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: conversion from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163835#M1568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use input statment&lt;/P&gt;&lt;P&gt;like:&lt;/P&gt;&lt;P&gt;num = input('56',6.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check: &lt;A href="http://www.ciser.cornell.edu/faq/sas/char2num.shtml"&gt;Converting a Character Variable to a Numeric Variable&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2014 09:00:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163835#M1568</guid>
      <dc:creator>mohamed_zaki</dc:creator>
      <dc:date>2014-09-29T09:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: conversion from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163836#M1569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;but i have to do in proc IML&amp;nbsp; and input statement is not working in IML &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2014 09:51:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163836#M1569</guid>
      <dc:creator>Rasheed</dc:creator>
      <dc:date>2014-09-29T09:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: conversion from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163837#M1570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the &lt;A href="http://support.sas.com/documentation/cdl/en/imlug/66845/HTML/default/viewer.htm#imlug_langref_sect285.htm"&gt;NUM function&lt;/A&gt;.&amp;nbsp; You could also use the INPUTN function if you want to apply a general informat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2014 10:34:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163837#M1570</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2014-09-29T10:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: conversion from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163838#M1571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Will this work within proc IML ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2014 13:53:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163838#M1571</guid>
      <dc:creator>Rasheed</dc:creator>
      <dc:date>2014-09-29T13:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: conversion from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163839#M1572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, this is the SAS/IML forum.&amp;nbsp; If it doesn't work then you should post your code so that we can see what you are trying to do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2014 14:09:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163839#M1572</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2014-09-29T14:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: conversion from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163840#M1573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I stored value 11 in ij&lt;/P&gt;&lt;P&gt;and want to convert it in numeric form with width 2 and decimal place 0 and store in ijn&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ijn=inputn(ij,6.&amp;lt;,2&amp;lt;,0&amp;gt;&amp;gt;); &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2014 14:22:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163840#M1573</guid>
      <dc:creator>Rasheed</dc:creator>
      <dc:date>2014-09-29T14:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: conversion from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163841#M1574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;ijn&lt;/SPAN&gt;&lt;SPAN style="color: #330000; font-family: 'Times New Roman', Times, serif; font-size: medium; background-color: #f0eee4;"&gt;=input(ij, 2.0);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2014 14:38:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163841#M1574</guid>
      <dc:creator>mohamed_zaki</dc:creator>
      <dc:date>2014-09-29T14:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: conversion from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163842#M1575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps you are getting confused by the difference between informats and formats.&amp;nbsp; When you use the NUM function, it uses a BEST. format to convert the characters to numbers. This is what you want to do.&amp;nbsp; If you want to display the numbers with a 6.2 format, you can use the FORMAT= option on the PRINT statement, as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;x = {"1"&amp;nbsp; "11"&amp;nbsp; "2.135"&amp;nbsp; "8"&amp;nbsp; "-3.14"};&lt;/P&gt;&lt;P&gt;y = num(x);&lt;/P&gt;&lt;P&gt;print y;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* BEST format */&lt;/P&gt;&lt;P&gt;print y[format=6.2];/* 6.2 format */&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2014 14:43:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163842#M1575</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2014-09-29T14:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: conversion from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163843#M1576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, the INPUT function is not supported in SAS/IML.&amp;nbsp; However, you can use the INPUTN format like this:&lt;/P&gt;&lt;P&gt;ijn = inputn(ij, "Best6.");&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2014 14:47:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163843#M1576</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2014-09-29T14:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: conversion from character to numeric</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163844#M1577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use following command and its work for me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ijn=inputn(ij,'6.',2,0);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2014 15:00:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/conversion-from-character-to-numeric/m-p/163844#M1577</guid>
      <dc:creator>Rasheed</dc:creator>
      <dc:date>2014-09-29T15:00:42Z</dc:date>
    </item>
  </channel>
</rss>

