<?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: loop for and if for column name change in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/loop-for-and-if-for-column-name-change/m-p/19659#M17915</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might have a look at &lt;A href="https://kvoqx44227.lithium.com/people/xan@jmp" target="_blank"&gt;xan@jmp&lt;/A&gt; 's&amp;nbsp; &lt;A href="https://community.jmp.com/docs/DOC-6145" target="_blank"&gt;Column Name Utility&lt;/A&gt; add-in for some tips on how to do this. &lt;/P&gt;&lt;P&gt;If you download the add-in and change the file suffix to .zip,&amp;nbsp; you can unzip it and see what he's doing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Oct 2016 13:28:38 GMT</pubDate>
    <dc:creator>MikeD_Anderson</dc:creator>
    <dc:date>2016-10-28T13:28:38Z</dc:date>
    <item>
      <title>loop for and if for column name change</title>
      <link>https://community.jmp.com/t5/Discussions/loop-for-and-if-for-column-name-change/m-p/19657#M17913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;all,&lt;/P&gt;&lt;P&gt;I would like to rename column name depending on some condition using a for loop with a if conditional.&lt;/P&gt;&lt;P&gt;But doesn't work.&lt;/P&gt;&lt;P&gt;If I set up the function out of the for loop then no issue.&lt;/P&gt;&lt;P&gt;code as below&lt;/P&gt;&lt;P&gt;For( i = 1, i &amp;lt;= 100, i++,&lt;/P&gt;&lt;P&gt;&amp;nbsp; If(i &amp;gt; 0 ,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Column(i) &amp;lt;&amp;lt; set name( char(munger(Column name(i), 1, "::try::", "-" ) ) ) );&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2016 05:29:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/loop-for-and-if-for-column-name-change/m-p/19657#M17913</guid>
      <dc:creator>KinKame</dc:creator>
      <dc:date>2016-07-26T05:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: loop for and if for column name change</title>
      <link>https://community.jmp.com/t5/Discussions/loop-for-and-if-for-column-name-change/m-p/19658#M17914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Column Name() function returns an expression, not a literal string.&amp;nbsp; So if you use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Column&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;i&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;set name&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;char&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;munger&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;char&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Column name&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;i&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"::try::"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"-"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 13.3333px; font-family: Consolas;"&gt;it should work&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2016 11:11:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/loop-for-and-if-for-column-name-change/m-p/19658#M17914</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2016-07-26T11:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: loop for and if for column name change</title>
      <link>https://community.jmp.com/t5/Discussions/loop-for-and-if-for-column-name-change/m-p/19659#M17915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might have a look at &lt;A href="https://kvoqx44227.lithium.com/people/xan@jmp" target="_blank"&gt;xan@jmp&lt;/A&gt; 's&amp;nbsp; &lt;A href="https://community.jmp.com/docs/DOC-6145" target="_blank"&gt;Column Name Utility&lt;/A&gt; add-in for some tips on how to do this. &lt;/P&gt;&lt;P&gt;If you download the add-in and change the file suffix to .zip,&amp;nbsp; you can unzip it and see what he's doing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 13:28:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/loop-for-and-if-for-column-name-change/m-p/19659#M17915</guid>
      <dc:creator>MikeD_Anderson</dc:creator>
      <dc:date>2016-10-28T13:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: loop for and if for column name change</title>
      <link>https://community.jmp.com/t5/Discussions/loop-for-and-if-for-column-name-change/m-p/19660#M17916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello Jim,&lt;/P&gt;&lt;P&gt;yes it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you very much for the code correction and also object property explanation. Very interesting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2016 01:31:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/loop-for-and-if-for-column-name-change/m-p/19660#M17916</guid>
      <dc:creator>KinKame</dc:creator>
      <dc:date>2016-07-27T01:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: loop for and if for column name change</title>
      <link>https://community.jmp.com/t5/Discussions/loop-for-and-if-for-column-name-change/m-p/19661#M17917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for the resource. It seems good to me but preferable to use&amp;nbsp; script and not add on.&lt;/P&gt;&lt;P&gt;but good for learning thank you!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2016 01:44:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/loop-for-and-if-for-column-name-change/m-p/19661#M17917</guid>
      <dc:creator>KinKame</dc:creator>
      <dc:date>2016-07-27T01:44:53Z</dc:date>
    </item>
  </channel>
</rss>

