<?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: Stack Columns with multiple names in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Stack-Columns-with-multiple-names/m-p/736941#M91787</link>
    <description>&lt;P&gt;OK-&lt;BR /&gt;Good that you are able to script. Thanks for clarifying that you are looking for something scalable to avoid renaming many columns..&lt;BR /&gt;&lt;BR /&gt;First as an aside/tangent- &lt;FONT color="#993366"&gt;as a tip&amp;amp;trick for column name manipulation in a manual mode, but at scale:&amp;nbsp; this is quick &amp;amp; powerful (&lt;U&gt;but needs to be done with care&lt;/U&gt;)&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;FONT color="#993366"&gt;in Columns Pane, select all columns- "copy"(puts the text in the copy buffer)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color="#993366"&gt;In another data table, (or a spreadsheet or word processing program), "Paste"- the list of columns is created as text.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#993366"&gt;Manipulate it as you wish (type edit text in place, make formula column to add prefix/suffix... whatever)... &lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color="#993366"&gt;"Copy" the edited list of text new column names&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color="#993366"&gt;Return to original table.&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;Clear columns selection,&lt;/STRONG&gt; then reselect list of columns in columns pane.. "Paste" to overwrite edited column names&lt;/FONT&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Back to the table operations method proposed before.&lt;BR /&gt;If the lowest character will always be 1/2 (or at least indicate the column family that should be stacked), this can be done in two table operations and a formula.&amp;nbsp; These steps could be scripted or captured in workflow builder if the actions need to be repeatable.&lt;BR /&gt;&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="GregF_JMP_0-1710961166093.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/62445i5CA75F1B9CCA6C99/image-size/large?v=v2&amp;amp;px=999" role="button" title="GregF_JMP_0-1710961166093.png" alt="GregF_JMP_0-1710961166093.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Add formula column to trim "Label", excluding lowest character&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GregF_JMP_1-1710961361707.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/62446iB008E7165DBB0A0C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GregF_JMP_1-1710961361707.png" alt="GregF_JMP_1-1710961361707.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Table "Split" Data by &lt;U&gt;Trimmed&lt;/U&gt; Label....&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GregF_JMP_2-1710961570759.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/62447i53DBFCF4A7536B7F/image-size/large?v=v2&amp;amp;px=999" role="button" title="GregF_JMP_2-1710961570759.png" alt="GregF_JMP_2-1710961570759.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Mar 2024 19:09:19 GMT</pubDate>
    <dc:creator>GregF_JMP</dc:creator>
    <dc:date>2024-03-20T19:09:19Z</dc:date>
    <item>
      <title>Stack Columns with multiple names</title>
      <link>https://community.jmp.com/t5/Discussions/Stack-Columns-with-multiple-names/m-p/736693#M91755</link>
      <description>&lt;P&gt;Hello everyone!&lt;BR /&gt;Lets say I have a data table which looks like that:&amp;nbsp;&lt;/P&gt;&lt;P&gt;A,B1,B2,C1,C2,D&lt;/P&gt;&lt;P&gt;1,2,3,4,5,16&lt;/P&gt;&lt;P&gt;6,7,8,9,10,16&lt;/P&gt;&lt;P&gt;11,12,13,14,15,16&lt;/P&gt;&lt;P&gt;I want to stack them so the new table looks like that:&amp;nbsp;&lt;/P&gt;&lt;P&gt;A,B,C&lt;/P&gt;&lt;P&gt;1,2,4&lt;/P&gt;&lt;P&gt;1,3,5&lt;/P&gt;&lt;P&gt;6,7,9&lt;/P&gt;&lt;P&gt;6,8,10&lt;/P&gt;&lt;P&gt;11,12,14&lt;/P&gt;&lt;P&gt;11,13,15&lt;/P&gt;&lt;P&gt;I have three lists: one containing columns that need to be kept: list_to_keep= {A},list_to_stack_before= {B1,C1} and&amp;nbsp;list_to_stack_after&amp;nbsp;= {B2,C2}.&lt;/P&gt;&lt;P&gt;First i wrote a script to create a new list with the new column names:&amp;nbsp;&lt;/P&gt;&lt;P&gt;new_column_names = {};&lt;/P&gt;&lt;P&gt;str = char(list_to_stack_before);&lt;BR /&gt;newstr = substitute(str,"", "", "_be_sam","");&lt;BR /&gt;new_column_names = parse(newstr);&lt;/P&gt;&lt;P&gt;Then I tried to loop the stack function but it always just adds more rows. I can not use the normal Stack function because it doesnt let me use multiple names in the Stacked Data Column argument. How can I solve this problem? Thanks a lot i am very new to jmp.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 11:13:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stack-Columns-with-multiple-names/m-p/736693#M91755</guid>
      <dc:creator>xXjmplearnerXx</dc:creator>
      <dc:date>2024-03-20T11:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: Stack Columns with multiple names</title>
      <link>https://community.jmp.com/t5/Discussions/Stack-Columns-with-multiple-names/m-p/736751#M91758</link>
      <description>&lt;P&gt;Hello new member&lt;/P&gt;
&lt;P&gt;While scripting can be done, perhaps see how far you can go prior to coding (protip- in JMP it's often pretty far).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Tables Menu, Stack command will get most of the way there.&amp;nbsp; The realtime preview is really helpful.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GregF_JMP_0-1710938942355.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/62411i5095DF07AF08CA6D/image-size/large?v=v2&amp;amp;px=999" role="button" title="GregF_JMP_0-1710938942355.png" alt="GregF_JMP_0-1710938942355.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After executing this command, rename the "Data" Cols to A and B, delete the Label Column.&lt;/P&gt;
&lt;P&gt;If you want to script it, after executing the stack command the green "Source" triangle in upper left panel will re-execute the action.&amp;nbsp; Right click/edit to see the script syntax.&lt;BR /&gt;To get script syntax - use workflow builder to record steps, then red triangle&amp;gt; save to script window.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 12:49:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stack-Columns-with-multiple-names/m-p/736751#M91758</guid>
      <dc:creator>GregF_JMP</dc:creator>
      <dc:date>2024-03-20T12:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Stack Columns with multiple names</title>
      <link>https://community.jmp.com/t5/Discussions/Stack-Columns-with-multiple-names/m-p/736790#M91764</link>
      <description>&lt;P&gt;Hello Greg, thanks a lot for your reply!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am familiar with the stack interface and also used the workflowbuilder to get a script to stack. The problem with renaming is that I do not have 3 columns that I want to stack but more like 40 and I expect it to grow with new measurements coming in..&lt;/P&gt;&lt;P&gt;I realized I could probably write a script to rename the columns using a list but this seems like a not so nice workaround and prone to mistakes in the order. I was hoping there is a smoother method. It's very unfortunate that the "new col names" option does not allow for more than one argument.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 13:28:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stack-Columns-with-multiple-names/m-p/736790#M91764</guid>
      <dc:creator>xXjmplearnerXx</dc:creator>
      <dc:date>2024-03-20T13:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Stack Columns with multiple names</title>
      <link>https://community.jmp.com/t5/Discussions/Stack-Columns-with-multiple-names/m-p/736848#M91773</link>
      <description>&lt;P&gt;Are you dropping column D?&amp;nbsp; In your real data tables, how do you decide which columns to drop?&amp;nbsp; What is the naming convention for the columns (pre- and post-stack)?&amp;nbsp; This shouldn't be too hard to automate via JSL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*edit*&lt;/P&gt;&lt;P&gt;Also, is the number of multiples always the same?&amp;nbsp; For instance, if there's a B1 and B2, will there always be C1 and C2, or could there also be a C3?&amp;nbsp; If so, how should that be handled?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 17:04:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stack-Columns-with-multiple-names/m-p/736848#M91773</guid>
      <dc:creator>mmarchandTSI</dc:creator>
      <dc:date>2024-03-20T17:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Stack Columns with multiple names</title>
      <link>https://community.jmp.com/t5/Discussions/Stack-Columns-with-multiple-names/m-p/736941#M91787</link>
      <description>&lt;P&gt;OK-&lt;BR /&gt;Good that you are able to script. Thanks for clarifying that you are looking for something scalable to avoid renaming many columns..&lt;BR /&gt;&lt;BR /&gt;First as an aside/tangent- &lt;FONT color="#993366"&gt;as a tip&amp;amp;trick for column name manipulation in a manual mode, but at scale:&amp;nbsp; this is quick &amp;amp; powerful (&lt;U&gt;but needs to be done with care&lt;/U&gt;)&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;FONT color="#993366"&gt;in Columns Pane, select all columns- "copy"(puts the text in the copy buffer)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color="#993366"&gt;In another data table, (or a spreadsheet or word processing program), "Paste"- the list of columns is created as text.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#993366"&gt;Manipulate it as you wish (type edit text in place, make formula column to add prefix/suffix... whatever)... &lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color="#993366"&gt;"Copy" the edited list of text new column names&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color="#993366"&gt;Return to original table.&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;Clear columns selection,&lt;/STRONG&gt; then reselect list of columns in columns pane.. "Paste" to overwrite edited column names&lt;/FONT&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Back to the table operations method proposed before.&lt;BR /&gt;If the lowest character will always be 1/2 (or at least indicate the column family that should be stacked), this can be done in two table operations and a formula.&amp;nbsp; These steps could be scripted or captured in workflow builder if the actions need to be repeatable.&lt;BR /&gt;&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="GregF_JMP_0-1710961166093.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/62445i5CA75F1B9CCA6C99/image-size/large?v=v2&amp;amp;px=999" role="button" title="GregF_JMP_0-1710961166093.png" alt="GregF_JMP_0-1710961166093.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Add formula column to trim "Label", excluding lowest character&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GregF_JMP_1-1710961361707.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/62446iB008E7165DBB0A0C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GregF_JMP_1-1710961361707.png" alt="GregF_JMP_1-1710961361707.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Table "Split" Data by &lt;U&gt;Trimmed&lt;/U&gt; Label....&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GregF_JMP_2-1710961570759.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/62447i53DBFCF4A7536B7F/image-size/large?v=v2&amp;amp;px=999" role="button" title="GregF_JMP_2-1710961570759.png" alt="GregF_JMP_2-1710961570759.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 19:09:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stack-Columns-with-multiple-names/m-p/736941#M91787</guid>
      <dc:creator>GregF_JMP</dc:creator>
      <dc:date>2024-03-20T19:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Stack Columns with multiple names</title>
      <link>https://community.jmp.com/t5/Discussions/Stack-Columns-with-multiple-names/m-p/736998#M91788</link>
      <description>&lt;P&gt;wow, nice link between multiple-series stack and stack + split !&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 21:46:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stack-Columns-with-multiple-names/m-p/736998#M91788</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-03-20T21:46:18Z</dc:date>
    </item>
  </channel>
</rss>

