<?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: Not Able To Invoke R from PROC IML in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Not-Able-To-Invoke-R-from-PROC-IML/m-p/114529#M887</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think that you have the version of SAS/IML that supports the SUBMIT statement.&lt;/P&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;c = cuprod(1:5);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If SAS/IML complains that the CUPROD function is not found, then you do not have the correct version of SAS/IML.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There were actually two different SAS releases that together rolled out the 9.22 functionality.&amp;nbsp; SAS/IML was in the second release. If memory serves, the SAS/IML release was somewhere around the end of September 2010.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Nov 2012 15:37:36 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2012-11-01T15:37:36Z</dc:date>
    <item>
      <title>Not Able To Invoke R from PROC IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Not-Able-To-Invoke-R-from-PROC-IML/m-p/114525#M883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I currently have version SAS 9.2 TS Level 2M3 and R 2.11.1 version installed on my local system running Windows XP 32 bit version. I have changed the configuration file "C:\Program Files\SAS92\SASFoundation\9.2\nls\en\SASV9.CFG" to include the -RLANG option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After I start SAS and run the below snippet of code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC OPTIONS OPTION=RLANG;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do get the message in the log "RLANG Support access to R language interfaces".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I run the below sample code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC IML;&lt;/P&gt;&lt;P&gt;SUBMIT / R;&lt;/P&gt;&lt;P&gt;a &amp;lt;- 2&lt;/P&gt;&lt;P&gt;paste("a:",a)&lt;/P&gt;&lt;P&gt;b &amp;lt;- 3&lt;/P&gt;&lt;P&gt;paste("b:",b)&lt;/P&gt;&lt;P&gt;c &amp;lt;- a * b&lt;/P&gt;&lt;P&gt;paste("c:",c)&lt;/P&gt;&lt;P&gt;ENDSUBMIT;&lt;/P&gt;&lt;P&gt;QUIT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the below error message in the log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;33&amp;nbsp;&amp;nbsp; PROC IML;&lt;BR /&gt;NOTE: IML Ready&lt;BR /&gt;34&amp;nbsp;&amp;nbsp; SUBMIT / R;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 180&lt;BR /&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;&lt;P&gt;35&amp;nbsp;&amp;nbsp; a &amp;lt;- 2&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 180&lt;BR /&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;&lt;P&gt;36&amp;nbsp;&amp;nbsp; paste("a:",a)&lt;BR /&gt;37&amp;nbsp;&amp;nbsp; b &amp;lt;- 3&lt;BR /&gt;38&amp;nbsp;&amp;nbsp; paste("b:",b)&lt;BR /&gt;39&amp;nbsp;&amp;nbsp; c &amp;lt;- a * b&lt;BR /&gt;40&amp;nbsp;&amp;nbsp; paste("c:",c)&lt;BR /&gt;41&amp;nbsp;&amp;nbsp; ENDSUBMIT;&lt;BR /&gt;42&amp;nbsp;&amp;nbsp; QUIT;&lt;BR /&gt;NOTE: Exiting IML.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE IML used (Total process time):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate any insight on how to fix this installation issue. Are there any other environmental variables that would need to be set?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vikram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 14:45:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Not-Able-To-Invoke-R-from-PROC-IML/m-p/114525#M883</guid>
      <dc:creator>vikramv786</dc:creator>
      <dc:date>2012-11-01T14:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: Not Able To Invoke R from PROC IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Not-Able-To-Invoke-R-from-PROC-IML/m-p/114526#M884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is R installed on the computer? see, e.g.: &lt;A href="http://support.sas.com/documentation/cdl/en/imlug/63541/HTML/default/viewer.htm#imlug_r_sect002.htm" title="http://support.sas.com/documentation/cdl/en/imlug/63541/HTML/default/viewer.htm#imlug_r_sect002.htm"&gt;http://support.sas.com/documentation/cdl/en/imlug/63541/HTML/default/viewer.htm#imlug_r_sect002.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 15:14:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Not-Able-To-Invoke-R-from-PROC-IML/m-p/114526#M884</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-01T15:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Not Able To Invoke R from PROC IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Not-Able-To-Invoke-R-from-PROC-IML/m-p/114527#M885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it is installed at "C:\Program Files\R\R-2.11.1".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 15:30:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Not-Able-To-Invoke-R-from-PROC-IML/m-p/114527#M885</guid>
      <dc:creator>vikramv786</dc:creator>
      <dc:date>2012-11-01T15:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Not Able To Invoke R from PROC IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Not-Able-To-Invoke-R-from-PROC-IML/m-p/114528#M886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;and is that the 32 or 64 bit version?&amp;nbsp; I ask because I think that only the 32 bit version is supported.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 15:34:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Not-Able-To-Invoke-R-from-PROC-IML/m-p/114528#M886</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-01T15:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Not Able To Invoke R from PROC IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Not-Able-To-Invoke-R-from-PROC-IML/m-p/114529#M887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think that you have the version of SAS/IML that supports the SUBMIT statement.&lt;/P&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;c = cuprod(1:5);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If SAS/IML complains that the CUPROD function is not found, then you do not have the correct version of SAS/IML.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There were actually two different SAS releases that together rolled out the 9.22 functionality.&amp;nbsp; SAS/IML was in the second release. If memory serves, the SAS/IML release was somewhere around the end of September 2010.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 15:37:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Not-Able-To-Invoke-R-from-PROC-IML/m-p/114529#M887</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-11-01T15:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Not Able To Invoke R from PROC IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Not-Able-To-Invoke-R-from-PROC-IML/m-p/114530#M888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Arthur: Its the 32 bit version that was installed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Rick: I ran the code that you sent and got the message "ERROR: Invocation of unresolved module CUPROD.". How can I check which version of SAS/IML I have? Is there a hotfix to upgrade the SAS/IML version? Appreciate your insight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;46&amp;nbsp;&amp;nbsp; proc iml;&lt;/P&gt;&lt;P&gt;NOTE: IML Ready&lt;/P&gt;&lt;P&gt;47&amp;nbsp;&amp;nbsp; c = cuprod(1:5);&lt;/P&gt;&lt;P&gt;ERROR: Invocation of unresolved module CUPROD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; statement : ASSIGN at line 47 column 1&lt;/P&gt;&lt;P&gt;48&amp;nbsp;&amp;nbsp; quit;&lt;/P&gt;&lt;P&gt;NOTE: Exiting IML.&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE IML used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 16:25:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Not-Able-To-Invoke-R-from-PROC-IML/m-p/114530#M888</guid>
      <dc:creator>vikramv786</dc:creator>
      <dc:date>2012-11-01T16:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Not Able To Invoke R from PROC IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Not-Able-To-Invoke-R-from-PROC-IML/m-p/114531#M889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I suspected, you do not have SAS/IML 9.22. You have just regular 9.2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A hotfix only fixes a bug in a current version of SAS, so it is not applicable here. To get new features, talk to your SAS administrator about updating to a newer version of SAS, such as 9.3M2 (which the analytical products call 12.1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps SAS/IML can solve your problem directly. What problem are you rtying to solve?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 16:37:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Not-Able-To-Invoke-R-from-PROC-IML/m-p/114531#M889</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-11-01T16:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Not Able To Invoke R from PROC IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Not-Able-To-Invoke-R-from-PROC-IML/m-p/114532#M890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rick. One of my team members here at Kaiser Permanente is reviewing some R code written in a research paper and wanted to incorporate it into his own current data research project. I am just trying to help him explore if we can call the R code within SAS instead of re-writing in PROC IML. Appreciate your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 16:59:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Not-Able-To-Invoke-R-from-PROC-IML/m-p/114532#M890</guid>
      <dc:creator>vikramv786</dc:creator>
      <dc:date>2012-11-01T16:59:50Z</dc:date>
    </item>
  </channel>
</rss>

