<?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 If Statement in For Loop Error in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/If-Statement-in-For-Loop-Error/m-p/216368#M43232</link>
    <description>&lt;P&gt;Hi! I am having trouble with putting my if statement in my for loop. I want my if statement to evalaute which elements in the array matches the word "Continuous", and store that column's data in a seperate array/list ( a suggestion for the best way to store coloumn data would also be helpful). I'd appreciate any help! Thanks.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Column Data = {};
 for(i= 0, i &amp;lt;= ncol, i++, 
 	if ((Result[i] == "Continuous"),
 		ColumnData = Column(columnName[i])
      );
);

 &lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 05 Jul 2019 17:47:13 GMT</pubDate>
    <dc:creator>dg1</dc:creator>
    <dc:date>2019-07-05T17:47:13Z</dc:date>
    <item>
      <title>If Statement in For Loop Error</title>
      <link>https://community.jmp.com/t5/Discussions/If-Statement-in-For-Loop-Error/m-p/216368#M43232</link>
      <description>&lt;P&gt;Hi! I am having trouble with putting my if statement in my for loop. I want my if statement to evalaute which elements in the array matches the word "Continuous", and store that column's data in a seperate array/list ( a suggestion for the best way to store coloumn data would also be helpful). I'd appreciate any help! Thanks.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Column Data = {};
 for(i= 0, i &amp;lt;= ncol, i++, 
 	if ((Result[i] == "Continuous"),
 		ColumnData = Column(columnName[i])
      );
);

 &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Jul 2019 17:47:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/If-Statement-in-For-Loop-Error/m-p/216368#M43232</guid>
      <dc:creator>dg1</dc:creator>
      <dc:date>2019-07-05T17:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: If Statement in For Loop Error</title>
      <link>https://community.jmp.com/t5/Discussions/If-Statement-in-For-Loop-Error/m-p/216389#M43234</link>
      <description>Hi, I don't have time to test your script but at first glance I can see a couple of issues:&lt;BR /&gt;1) You do not define the table to be used by your script&lt;BR /&gt;2) Your call of "ncol" does not refer to any data table&lt;BR /&gt;3) You do not define the variable "Result" which you use as an array&lt;BR /&gt;4) Reference to a specific column content with "Column (ColumnName [i])" is not likely to work, maybe trying something like just "column[i]" might work better&lt;BR /&gt;5) Your assignment to "ColumnData" is not likely to work as you want because you are not appending each column content to the variable "ColumnData"</description>
      <pubDate>Fri, 05 Jul 2019 18:27:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/If-Statement-in-For-Loop-Error/m-p/216389#M43234</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2019-07-05T18:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: If Statement in For Loop Error</title>
      <link>https://community.jmp.com/t5/Discussions/If-Statement-in-For-Loop-Error/m-p/216391#M43236</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open(Example.jmp");
columnName = dt &amp;lt;&amp;lt; Get Column Names (String);
ncol = 4;
Result = {"Continuous", "Continuous", "Categorical", "Continuous") // this is variable 
ColumnData = {};
 for(i= 0, i &amp;lt;= ncol, i++, 
 	if ((Result[i] == "Continuous"), // i am getting an error for this statement
 		ColumnData = Column(columnName[i])
              // i want to store just column data and put it into a matrix, and perform operations on it 

      );
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thank you for your quick response. I apologize for not providng enough details earlier. Are you able to tell what is wrong with the code above? I appreciate your help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 18:44:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/If-Statement-in-For-Loop-Error/m-p/216391#M43236</guid>
      <dc:creator>dg1</dc:creator>
      <dc:date>2019-07-05T18:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: If Statement in For Loop Error</title>
      <link>https://community.jmp.com/t5/Discussions/If-Statement-in-For-Loop-Error/m-p/216478#M43256</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/15243"&gt;@dg1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;ColumnData = Column(columnName[i]) &amp;lt;&amp;lt; get as matrix&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Jul 2019 10:24:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/If-Statement-in-For-Loop-Error/m-p/216478#M43256</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2019-07-08T10:24:45Z</dc:date>
    </item>
  </channel>
</rss>

