<?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: JSL Create new summary table with Max values of variable columns in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-Create-new-summary-table-with-Max-values-of-variable-columns/m-p/403124#M65383</link>
    <description>&lt;P&gt;Under thw latest version JMP, the code works fine. Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 22 Jul 2021 03:17:20 GMT</pubDate>
    <dc:creator>GoodMan</dc:creator>
    <dc:date>2021-07-22T03:17:20Z</dc:date>
    <item>
      <title>JSL Create new summary table with Max values of variable columns</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Create-new-summary-table-with-Max-values-of-variable-columns/m-p/402712#M65353</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I've enjoyed reading and finding solutions on these discussion pages for a while now, but now have been fumbling to figure this out.&lt;/P&gt;&lt;P&gt;I have a data table that gives variable number of columns, auto generated by machine, where the first 14 columns are always the same identifying information. The other columns, 15 onwards, are Numeric Continuous data where the column names will always vary.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Issue is I am trying to automate the creation of a summary table that will group the data by it's identifying information and also have a column of the Max data for each data column.&lt;/P&gt;&lt;P&gt;With a varying number of data columns and varying column names, Is it possible to iterate through each column? Such as a for-loop to get all the Max values into the summary table? I am limited by being unable to name all the columns b/c of the varying column names each pull, but it is safe to say every column after the 14th column will need the Max values found.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the JSL script I've been trying to edit, but hit a dead end on generating the Max columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;sumdt = table &amp;lt;&amp;lt; Summary(
	Group(:NAME,:ID),
	(Max(Column(table, 15:154)), // having issue on this line
	Output Table Name("Summary Max Values")
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for any inputs to my issue!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:52:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Create-new-summary-table-with-Max-values-of-variable-columns/m-p/402712#M65353</guid>
      <dc:creator>Glo_Roh</dc:creator>
      <dc:date>2023-06-09T19:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Create new summary table with Max values of variable columns</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Create-new-summary-table-with-Max-values-of-variable-columns/m-p/402735#M65354</link>
      <description>&lt;P&gt;Here is an example of doing what you want with the Big Class sample data table.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here( 1 );

// Open Data Table: big class.jmp
// → Data Table( "big class" )
dt = Open( "$SAMPLE_DATA/big class.jmp" );

colNamesList = dt &amp;lt;&amp;lt; get column names( continuous, string );
	

sumdt = dt &amp;lt;&amp;lt; summary(
	Group( :Sex, :Age ),
	max( colNamesList ),
	Output Table( "Summary Max Values"),
	Link to Original Data Table( 0 )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1626827888177.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/34405iF361900022997600/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1626827888177.png" alt="txnelson_0-1626827888177.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 00:38:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Create-new-summary-table-with-Max-values-of-variable-columns/m-p/402735#M65354</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-07-21T00:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Create new summary table with Max values of variable columns</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Create-new-summary-table-with-Max-values-of-variable-columns/m-p/402749#M65355</link>
      <description>&lt;P&gt;Thank you&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;&lt;P&gt;that partially solved my issue.&lt;/P&gt;&lt;P&gt;My original data table has date columns that I do not want Max values analyzed, basically running into issue that I don't want to be calculating the Max values of the first 14 columns regardless of their data type.&amp;nbsp;&lt;BR /&gt;Is there a way to ignore the first 14 columns or would it be easier create a new table that deletes the unwanted columns first before passing it through for a summary table?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Gloria&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 01:52:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Create-new-summary-table-with-Max-values-of-variable-columns/m-p/402749#M65355</guid>
      <dc:creator>Glo_Roh</dc:creator>
      <dc:date>2021-07-21T01:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Create new summary table with Max values of variable columns</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Create-new-summary-table-with-Max-values-of-variable-columns/m-p/402750#M65356</link>
      <description>&lt;P&gt;After the colNamesList is created, you can use the Remove From() function to delete specific rows in the list, and then once the list is whittled down to just the columns you want, you can use it for the generation of the Summary Table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See the Scripting Index entry for the definition and example of the Remove From() function&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 01:57:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Create-new-summary-table-with-Max-values-of-variable-columns/m-p/402750#M65356</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-07-21T01:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Create new summary table with Max values of variable columns</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Create-new-summary-table-with-Max-values-of-variable-columns/m-p/402751#M65357</link>
      <description>&lt;P&gt;Thanks so much&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;That is perfect. Since I know which columns I want removed, the Remove from() function is just what I needed.&lt;BR /&gt;&lt;BR /&gt;Here's basically the code that does exactly what I need:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here( 1 );

// Open Data Table: big class.jmp
// → Data Table( "big class" )
dt = Open( "$SAMPLE_DATA/big class.jmp" );

colNamesList = dt &amp;lt;&amp;lt; get column names( continuous, string );
Remove From(colNamesList, 1,2 ); //removes first two columns that I don't want evaluated	

sumdt = dt &amp;lt;&amp;lt; summary(
	Group( :Sex, :Age ),
	max( colNamesList ),
	Output Table( "Summary Max Values"),
	Link to Original Data Table( 0 )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Jul 2021 02:23:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Create-new-summary-table-with-Max-values-of-variable-columns/m-p/402751#M65357</guid>
      <dc:creator>Glo_Roh</dc:creator>
      <dc:date>2021-07-21T02:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Create new summary table with Max values of variable columns</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Create-new-summary-table-with-Max-values-of-variable-columns/m-p/402755#M65358</link>
      <description>&lt;P&gt;Hi, Thanks for your code. Here i found i just can get Max of first numeric column,&amp;nbsp;height. Please see attachment. I guess the Max just function to the first value of list. Can you help me know why?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 04:24:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Create-new-summary-table-with-Max-values-of-variable-columns/m-p/402755#M65358</guid>
      <dc:creator>GoodMan</dc:creator>
      <dc:date>2021-07-21T04:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Create new summary table with Max values of variable columns</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Create-new-summary-table-with-Max-values-of-variable-columns/m-p/403124#M65383</link>
      <description>&lt;P&gt;Under thw latest version JMP, the code works fine. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 03:17:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Create-new-summary-table-with-Max-values-of-variable-columns/m-p/403124#M65383</guid>
      <dc:creator>GoodMan</dc:creator>
      <dc:date>2021-07-22T03:17:20Z</dc:date>
    </item>
  </channel>
</rss>

