<?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: Re writing code in Proc IML in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Re-writing-code-in-Proc-IML/m-p/571604#M4744</link>
    <description>&lt;P&gt;To add on the resources, there is a eLearning training from SAS, "SAS Programming for R Users" with video presentations, demo codes and exercises. One of the topics is on IML and how to call R from IML. It is free.&lt;/P&gt;</description>
    <pubDate>Sat, 06 Jul 2019 20:22:46 GMT</pubDate>
    <dc:creator>arthurcavila</dc:creator>
    <dc:date>2019-07-06T20:22:46Z</dc:date>
    <item>
      <title>Re writing code in Proc IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Re-writing-code-in-Proc-IML/m-p/571538#M4737</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello I am trying to write this&amp;nbsp; R code in IML is there an help on this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;general.d &amp;lt;- function (m, s){&lt;BR /&gt;k=length(s)&lt;BR /&gt;m1_x = length (m)&lt;BR /&gt;sum.s = 0&lt;BR /&gt;for (i in 1:k){&lt;BR /&gt;sum.s = sum.s+s[i]^2&lt;BR /&gt;s_pooled=sqrt(sum.s/k)&lt;BR /&gt;}&lt;BR /&gt;if (m1_x==1 &amp;amp; k==1){&lt;BR /&gt;return (d=m/s)&lt;BR /&gt;}&lt;BR /&gt;else if (m1_x==2 &amp;amp; k==1){&lt;BR /&gt;m_1 = diff(m)&lt;BR /&gt;return(d=m_1/s_pooled)&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;m_2 = max(m) - min(m)&lt;BR /&gt;return(d_2=m_2/s_pooled)&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;general.d &amp;lt;- function (m, s);
k=length(s)
m1_x = length (m)
sum.s = 0
for (i in 1:k);
  sum.s = sum.s+s[i]^2
  s_pooled=sqrt(sum.s/k)

if (m1_x==1 &amp;amp; k==1);
  return (d=m/s); 

else if (m1_x==2 &amp;amp; k==1){
  m_1 = diff(m);
  return(d=m_1/s_pooled);

else {
  m_2 = max(m) - min(m);
  return(d_2=m_2/s_pooled);

run;
quit;


&lt;/PRE&gt;&lt;P&gt;But I get an error code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am doing wrongly I will be glad to receive help&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jul 2019 02:15:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Re-writing-code-in-Proc-IML/m-p/571538#M4737</guid>
      <dc:creator>Lawongd</dc:creator>
      <dc:date>2019-07-06T02:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: Re writing code in Proc IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Re-writing-code-in-Proc-IML/m-p/571563#M4738</link>
      <description>&lt;P&gt;So, we don't really need to see your R code. We do need to see your SAS code and the SAS log which contains the error (saying "But I get an error code" is never enough information).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, please provide the entire SAS log for your IML (not just the error code) by clicking on the {i} icon (this is mandatory) and pasting your SAS log into the window that appears. Do not provide the SAS log any other way.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jul 2019 12:05:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Re-writing-code-in-Proc-IML/m-p/571563#M4738</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-06T12:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Re writing code in Proc IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Re-writing-code-in-Proc-IML/m-p/571565#M4739</link>
      <description>&lt;P&gt;Post it at IML forum&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp; might give you a hand .&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jul 2019 11:44:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Re-writing-code-in-Proc-IML/m-p/571565#M4739</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-07-06T11:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: Re writing code in Proc IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Re-writing-code-in-Proc-IML/m-p/571571#M4740</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;gt; I am trying to write this in IML is there any help on this?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, there are many resources for learning to program in SAS/IML. Start with &lt;A href="https://blogs.sas.com/content/iml/2014/08/11/ten-tips-for-learning-sasiml.html" target="_self"&gt;"10 tips for learning the SAS/IML language."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You can also go straight to the &lt;A href="https://go.documentation.sas.com/?docsetId=imlug&amp;amp;docsetTarget=titlepage.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;&lt;EM&gt;SAS/IML User's Guide.&lt;/EM&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jul 2019 13:18:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Re-writing-code-in-Proc-IML/m-p/571571#M4740</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-07-06T13:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Re writing code in Proc IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Re-writing-code-in-Proc-IML/m-p/571598#M4741</link>
      <description>&lt;PRE&gt; 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         proc iml;
 NOTE: IML Ready
 74         start general_d &amp;lt;- function (m, s);
                            _
                            22
                            200
 ERROR 22-322: Syntax error, expecting one of the following: ;, (.  
 
 ERROR 200-322: The symbol is not recognized and will be ignored.
 
 75         k=length(s);
 76         m1_x = length (m);
 77         sum_s = 0;
 78         for (i in 1:k);
            ___
            180
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 
 79           sum_s = sum.s+s[i]^2
                      _____     _
                      22        76
                      201
 ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant, 
               a missing value, (, +, -, [, ^, {.  
 
 ERROR 76-322: Syntax error, statement will be ignored.
 
 ERROR 201-322: The option is not recognized and will be ignored.
 
 79       ! sum_s = sum.s+s[i]^2
                                _
                                22
 ERROR 22-322: Syntax error, expecting one of the following: ;, #, ##, $, &amp;amp;, (|, *, **, +, -, /, //, :, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, @, 
               [, ^=, `, |, ||.  
 80           s_pooled=sqrt(sum.s/k);
 81         
 82         if (m1_x==1 &amp;amp; k==1)
                     _
                     22
                     76
 ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant, 
               a missing value, +.  
 ERROR 76-322: Syntax error, statement will be ignored.
 83           return (d=m/s);
 84         
 85         else if (m1_x==2 &amp;amp; k==1);
                          _
                          22
                          76
 ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant, 
               a missing value, +.  
 
 ERROR 76-322: Syntax error, statement will be ignored.
 
 86           m_1 = diff(m);
 87           return(d=m_1/s_pooled);
 88         
 89         else
 90           m_2 = max(m) - min(m);
 91           return(d_2=m_2/s_pooled);
 92         run;
 WARNING: Module GENERAL_D definition is left incomplete.
 93         quit;
 NOTE: Exiting IML.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE IML used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              401.75k
       OS Memory           28580.00k
       Timestamp           07/06/2019 07:26:01 PM
       Step Count                        30  Switch Count  0
       Page Faults                       0
       Page Reclaims                     134
       Page Swaps                        0
       Voluntary Context Switches        0
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           0
       
 94         
 95         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 108        &lt;/PRE&gt;</description>
      <pubDate>Sat, 06 Jul 2019 19:26:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Re-writing-code-in-Proc-IML/m-p/571598#M4741</guid>
      <dc:creator>Lawongd</dc:creator>
      <dc:date>2019-07-06T19:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Re writing code in Proc IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Re-writing-code-in-Proc-IML/m-p/571600#M4742</link>
      <description>&lt;P&gt;Okay, simple question ... there is an interface in PROC IML that allows you to run R code. Are you trying to run your exact R code inside of PROC IML?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or are you trying to rewrite the R code as native PROC IML code (as your title implies)? You can't simply paste R code into PROC IML and expect it to run. The syntax used by R is completely different than the syntax used by PROC IML.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jul 2019 19:32:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Re-writing-code-in-Proc-IML/m-p/571600#M4742</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-06T19:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Re writing code in Proc IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Re-writing-code-in-Proc-IML/m-p/571603#M4743</link>
      <description>&lt;P&gt;I am trying to rewrite the R code to Proc IML&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jul 2019 19:57:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Re-writing-code-in-Proc-IML/m-p/571603#M4743</guid>
      <dc:creator>Lawongd</dc:creator>
      <dc:date>2019-07-06T19:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: Re writing code in Proc IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Re-writing-code-in-Proc-IML/m-p/571604#M4744</link>
      <description>&lt;P&gt;To add on the resources, there is a eLearning training from SAS, "SAS Programming for R Users" with video presentations, demo codes and exercises. One of the topics is on IML and how to call R from IML. It is free.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jul 2019 20:22:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Re-writing-code-in-Proc-IML/m-p/571604#M4744</guid>
      <dc:creator>arthurcavila</dc:creator>
      <dc:date>2019-07-06T20:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Re writing code in Proc IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Re-writing-code-in-Proc-IML/m-p/571606#M4745</link>
      <description>&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jul 2019 20:33:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Re-writing-code-in-Proc-IML/m-p/571606#M4745</guid>
      <dc:creator>Lawongd</dc:creator>
      <dc:date>2019-07-06T20:33:07Z</dc:date>
    </item>
  </channel>
</rss>

