<?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: Append a string to column names in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Append-a-string-to-column-names/m-p/615057#M81488</link>
    <description>&lt;P&gt;Or using a bit similar idea as &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/610"&gt;@Jed_Campbell&lt;/a&gt; had, you could&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;select the columns of interest and first row&lt;/LI&gt;
&lt;LI&gt;subset with selected rows and columns&lt;/LI&gt;
&lt;LI&gt;drop headers down&lt;/LI&gt;
&lt;LI&gt;transpose&lt;/LI&gt;
&lt;LI&gt;create your new column names&lt;/LI&gt;
&lt;LI&gt;go to recode&lt;/LI&gt;
&lt;LI&gt;use apply mapping from table&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1679420193421.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/51345i3EF3879199275B14/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1679420193421.png" alt="jthi_1-1679420193421.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_2-1679420204899.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/51346i5DBF38D61848B943/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_2-1679420204899.png" alt="jthi_2-1679420204899.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_3-1679420216070.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/51347i136DD3905DF0BC94/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_3-1679420216070.png" alt="jthi_3-1679420216070.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1679420160617.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/51344iAF2F9D727A941086/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1679420160617.png" alt="jthi_0-1679420160617.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Mar 2023 17:37:11 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2023-03-21T17:37:11Z</dc:date>
    <item>
      <title>Append a string to column names</title>
      <link>https://community.jmp.com/t5/Discussions/Append-a-string-to-column-names/m-p/614760#M81465</link>
      <description>&lt;P&gt;What is the easiest way to append a string to columns names?&lt;/P&gt;&lt;P&gt;Not to all of them, but just to some selected ones.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Up to now, I used&amp;nbsp;&lt;STRONG&gt;Rename Columns &lt;/STRONG&gt;from the &lt;STRONG&gt;Jmp Scripting tools&lt;/STRONG&gt; Add-In :&lt;BR /&gt;&lt;LI-MESSAGE title="Scripting Tools" uid="410943" url="https://community.jmp.com/t5/JMP-Add-Ins/Scripting-Tools/m-p/410943#U410943" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1679406742553.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/51307i0FD8DD6776BD190F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1679406742553.png" alt="hogi_0-1679406742553.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;But the actions of the Add-In are not captured by the Workflow Builder.&lt;/P&gt;&lt;P&gt;This is why I am interested in how to do it directly in Jmp without the help of an add-in.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Replace String&lt;/STRONG&gt; from the &lt;STRONG&gt;Recode Column Names&lt;/STRONG&gt;&amp;nbsp;menu looks similar.&lt;/P&gt;&lt;P&gt;a)&amp;nbsp; Is there an option to apply the change just to &lt;STRONG&gt;some selected columns&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;b) How must the &lt;STRONG&gt;Regex expression&lt;/STRONG&gt; look like to add a string to the existing column names?&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Using the same syntax as in &lt;STRONG&gt;Jmp Scripting tools/Rename Columns,&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;the appended string is added twice:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_1-1679407747917.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/51310i79E11BF321633E73/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_1-1679407747917.png" alt="hogi_1-1679407747917.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 14:51:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Append-a-string-to-column-names/m-p/614760#M81465</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-06-27T14:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Append a string to column names</title>
      <link>https://community.jmp.com/t5/Discussions/Append-a-string-to-column-names/m-p/614825#M81470</link>
      <description>&lt;P&gt;Here is an example of the way I approach adding text to a column name.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = 
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );

dt &amp;lt;&amp;lt; select columns( :height, :weight );

selCols = dt &amp;lt;&amp;lt; get selected columns( string );

For Each( {col}, selCols,
	Column( col ) &amp;lt;&amp;lt; set name( col || " " || "Added Text" )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Mar 2023 14:51:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Append-a-string-to-column-names/m-p/614825#M81470</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-03-21T14:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Append a string to column names</title>
      <link>https://community.jmp.com/t5/Discussions/Append-a-string-to-column-names/m-p/614826#M81471</link>
      <description>&lt;P&gt;This might be a completely different direction than you were thinking, but the attached workflow adds a string to all the column names by moving the column names down, transposing the table, adding a column with the constant string of 'abcd,' then concatenating this new column with the column names, and finishes by re-transposing and moving the column names up. It does change all the column modeling data types though, which is likely a problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To make it add to just some of the column names, you could use a formula column, rather than a constant column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, this is less of a solution and more of a potential catalyst for a way to think about it. Perhaps others will chime in with better ideas.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 14:54:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Append-a-string-to-column-names/m-p/614826#M81471</guid>
      <dc:creator>Jed_Campbell</dc:creator>
      <dc:date>2023-03-21T14:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Append a string to column names</title>
      <link>https://community.jmp.com/t5/Discussions/Append-a-string-to-column-names/m-p/614899#M81476</link>
      <description>&lt;P&gt;For regex try using + instead of *&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1679413792661.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/51334i66C879A611F1C2F8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1679413792661.png" alt="jthi_0-1679413792661.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 15:50:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Append-a-string-to-column-names/m-p/614899#M81476</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-03-21T15:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Append a string to column names</title>
      <link>https://community.jmp.com/t5/Discussions/Append-a-string-to-column-names/m-p/614921#M81478</link>
      <description>&lt;P&gt;great, thanks&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Hm, for the "apply to some columns" I hope there is some easy solution hiding somewhere in &lt;STRONG&gt;Recode&lt;/STRONG&gt;?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 16:01:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Append-a-string-to-column-names/m-p/614921#M81478</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-03-21T16:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Append a string to column names</title>
      <link>https://community.jmp.com/t5/Discussions/Append-a-string-to-column-names/m-p/615057#M81488</link>
      <description>&lt;P&gt;Or using a bit similar idea as &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/610"&gt;@Jed_Campbell&lt;/a&gt; had, you could&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;select the columns of interest and first row&lt;/LI&gt;
&lt;LI&gt;subset with selected rows and columns&lt;/LI&gt;
&lt;LI&gt;drop headers down&lt;/LI&gt;
&lt;LI&gt;transpose&lt;/LI&gt;
&lt;LI&gt;create your new column names&lt;/LI&gt;
&lt;LI&gt;go to recode&lt;/LI&gt;
&lt;LI&gt;use apply mapping from table&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1679420193421.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/51345i3EF3879199275B14/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1679420193421.png" alt="jthi_1-1679420193421.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_2-1679420204899.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/51346i5DBF38D61848B943/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_2-1679420204899.png" alt="jthi_2-1679420204899.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_3-1679420216070.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/51347i136DD3905DF0BC94/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_3-1679420216070.png" alt="jthi_3-1679420216070.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1679420160617.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/51344iAF2F9D727A941086/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1679420160617.png" alt="jthi_0-1679420160617.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 17:37:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Append-a-string-to-column-names/m-p/615057#M81488</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-03-21T17:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Append a string to column names</title>
      <link>https://community.jmp.com/t5/Discussions/Append-a-string-to-column-names/m-p/616629#M81628</link>
      <description>&lt;P&gt;Ok, doesn't seem so ....&lt;BR /&gt;So, Jmp could be improved by copying this functionality from the&amp;nbsp;&lt;LI-MESSAGE title="Scripting Tools" uid="410943" url="https://community.jmp.com/t5/JMP-Add-Ins/Scripting-Tools/m-p/410943#U410943" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Here you can find the corresponding suggestion in the Wish List:&lt;BR /&gt;&lt;LI-MESSAGE title="Recode and Recode Column Names: apply for specific rows/columns" uid="615944" url="https://community.jmp.com/t5/JMP-Wish-List/Recode-and-Recode-Column-Names-apply-for-specific-rows-columns/m-p/615944#U615944" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 14:50:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Append-a-string-to-column-names/m-p/616629#M81628</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-06-27T14:50:55Z</dc:date>
    </item>
  </channel>
</rss>

