<?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 Easy way of reordering columns in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Easy-way-of-reordering-columns/m-p/516646#M74307</link>
    <description>&lt;P&gt;I have a script that reformats many files and performs some analysis producing a final summary table, however the order in which the calculations are done and new columns are added doesn't produce a very readable format.&lt;/P&gt;&lt;P&gt;I would like to pass the list of column names in the order I want them.&lt;/P&gt;&lt;P&gt;Is there a built - in way of doing this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g. if I had a table with: Column 1, Column 2, Column 3, Column 4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to pass in the list {Column 2, Column 4, Column 1, Column 3} to the table and have the reorder the table columns to match.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 17:03:08 GMT</pubDate>
    <dc:creator>Agustin</dc:creator>
    <dc:date>2023-06-09T17:03:08Z</dc:date>
    <item>
      <title>Easy way of reordering columns</title>
      <link>https://community.jmp.com/t5/Discussions/Easy-way-of-reordering-columns/m-p/516646#M74307</link>
      <description>&lt;P&gt;I have a script that reformats many files and performs some analysis producing a final summary table, however the order in which the calculations are done and new columns are added doesn't produce a very readable format.&lt;/P&gt;&lt;P&gt;I would like to pass the list of column names in the order I want them.&lt;/P&gt;&lt;P&gt;Is there a built - in way of doing this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g. if I had a table with: Column 1, Column 2, Column 3, Column 4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to pass in the list {Column 2, Column 4, Column 1, Column 3} to the table and have the reorder the table columns to match.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:03:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Easy-way-of-reordering-columns/m-p/516646#M74307</guid>
      <dc:creator>Agustin</dc:creator>
      <dc:date>2023-06-09T17:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Easy way of reordering columns</title>
      <link>https://community.jmp.com/t5/Discussions/Easy-way-of-reordering-columns/m-p/516710#M74317</link>
      <description>&lt;P&gt;Here is the way I handle this.&amp;nbsp; By working backwards through the list, and moving each to the first position, the columns end up as you want them.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
myList = {"age", "weight", "height"};
For( i = N Items( myList ), i &amp;gt;= 1, i--,
	Eval( Parse( "dt &amp;lt;&amp;lt; Move Selected Columns(" || myList[i] || ", To first )" ) )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Jul 2022 14:22:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Easy-way-of-reordering-columns/m-p/516710#M74317</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-07-01T14:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: Easy way of reordering columns</title>
      <link>https://community.jmp.com/t5/Discussions/Easy-way-of-reordering-columns/m-p/516715#M74318</link>
      <description>&lt;P&gt;Nice, &amp;nbsp;simple and clever solution&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2022 14:28:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Easy-way-of-reordering-columns/m-p/516715#M74318</guid>
      <dc:creator>stan_koprowski</dc:creator>
      <dc:date>2022-07-01T14:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Easy way of reordering columns</title>
      <link>https://community.jmp.com/t5/Discussions/Easy-way-of-reordering-columns/m-p/516790#M74324</link>
      <description>&lt;P&gt;That's such an ingenious fix!&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2022 15:59:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Easy-way-of-reordering-columns/m-p/516790#M74324</guid>
      <dc:creator>Agustin</dc:creator>
      <dc:date>2022-07-01T15:59:05Z</dc:date>
    </item>
  </channel>
</rss>

