<?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 equal to symbol in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/not-equal-to-symbol/m-p/50001#M28449</link>
    <description>&lt;P&gt;The way I read your script,&amp;nbsp;it will only change the data and modeling type for columns that &lt;STRONG&gt;immediately&lt;/STRONG&gt; start with "Std" (e.g. a column named "Std Dev" would be modified, but a column named "Col Std" would not).&lt;/P&gt;&lt;P&gt;Contains() returns the position in the string&amp;nbsp;of the substring you specified.&amp;nbsp; If cols[i] = "Std Dev", Contains(cols[i],"Std") will return the value 1.&amp;nbsp; If cols[i] = "Col Std", then Contains(cols[i], "Std") will return the value 5 because that "Std" starts with the 5th character in the string.&amp;nbsp; Only if I try a column name that doesn't have the "Std" in the name will Contains() return 0.&lt;/P&gt;&lt;P&gt;Contains(cols[i], "Std")&amp;nbsp; != 1 will return true for all columns names that don't immediately start with "Std".&lt;/P&gt;&lt;P&gt;Typically, the way to use Contains() to determine if a substring is contained within a string&amp;nbsp;would be to use either "!=0" or "&amp;gt;0".&amp;nbsp; Switch the 1 to a 0 and see if that works.&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jan 2018 01:03:02 GMT</pubDate>
    <dc:creator>cwillden</dc:creator>
    <dc:date>2018-01-23T01:03:02Z</dc:date>
    <item>
      <title>not equal to symbol</title>
      <link>https://community.jmp.com/t5/Discussions/not-equal-to-symbol/m-p/49999#M28447</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have the following script and it does not select the correct columns names ("Std"). Here is the script:&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;cols = dt &amp;lt;&amp;lt; Get column Names();
 
for( i = 1, i &amp;lt;= N Items( cols ), i++,
if( contains( cols[i] , "Std")  != 1
,
Column( dt, cols[i] ) &amp;lt;&amp;lt; Set Data Type( "Character" );
Column( dt, cols[i] ) &amp;lt;&amp;lt; Set Modeling Type ("Nominal")
)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;Looks like != does not do the job. Any help on this? Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 19:12:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/not-equal-to-symbol/m-p/49999#M28447</guid>
      <dc:creator>AT</dc:creator>
      <dc:date>2018-01-23T19:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: not equal to symbol</title>
      <link>https://community.jmp.com/t5/Discussions/not-equal-to-symbol/m-p/50001#M28449</link>
      <description>&lt;P&gt;The way I read your script,&amp;nbsp;it will only change the data and modeling type for columns that &lt;STRONG&gt;immediately&lt;/STRONG&gt; start with "Std" (e.g. a column named "Std Dev" would be modified, but a column named "Col Std" would not).&lt;/P&gt;&lt;P&gt;Contains() returns the position in the string&amp;nbsp;of the substring you specified.&amp;nbsp; If cols[i] = "Std Dev", Contains(cols[i],"Std") will return the value 1.&amp;nbsp; If cols[i] = "Col Std", then Contains(cols[i], "Std") will return the value 5 because that "Std" starts with the 5th character in the string.&amp;nbsp; Only if I try a column name that doesn't have the "Std" in the name will Contains() return 0.&lt;/P&gt;&lt;P&gt;Contains(cols[i], "Std")&amp;nbsp; != 1 will return true for all columns names that don't immediately start with "Std".&lt;/P&gt;&lt;P&gt;Typically, the way to use Contains() to determine if a substring is contained within a string&amp;nbsp;would be to use either "!=0" or "&amp;gt;0".&amp;nbsp; Switch the 1 to a 0 and see if that works.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 01:03:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/not-equal-to-symbol/m-p/50001#M28449</guid>
      <dc:creator>cwillden</dc:creator>
      <dc:date>2018-01-23T01:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: not equal to symbol</title>
      <link>https://community.jmp.com/t5/Discussions/not-equal-to-symbol/m-p/50006#M28453</link>
      <description>&lt;P&gt;Thanks so much for quick help. Replacing 1 by 0 works perfectly.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 01:35:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/not-equal-to-symbol/m-p/50006#M28453</guid>
      <dc:creator>AT</dc:creator>
      <dc:date>2018-01-23T01:35:14Z</dc:date>
    </item>
  </channel>
</rss>

