<?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: how to script for finding maximum, minimum date value in a row for 100+ columns in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/321657#M57169</link>
    <description>&lt;P&gt;If you want to only use the 10th through the end of the data table, you can change the elements in the list used for the column specification.&amp;nbsp; Here is a modification of the formula I previously submitted&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( Row() == 1,
	theList = Current Data Table() &amp;lt;&amp;lt; get column names(  );
        remove from( theList, 1, 9 );
);
Max( theLIst );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Documentation on List modification can be found in the Scripting Guide.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Oct 2020 16:00:54 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2020-10-14T16:00:54Z</dc:date>
    <item>
      <title>how to script for finding maximum, minimum date value in a row for 100+ columns</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/321241#M57134</link>
      <description>&lt;P&gt;i have a table with 500+ rows and 100+ columns. Populated with numeric values (dates). I need to find the maximum and minimum value along each row for earliest and latest date. i guess the script would be similar to 'Maximum (column1........column100)' for each row. But i am not sure how to script the column ranges along each row.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:20:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/321241#M57134</guid>
      <dc:creator>tonkatsu2020</dc:creator>
      <dc:date>2023-06-10T23:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to script for finding maximum, minimum date value in a row for 100+ columns</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/321261#M57135</link>
      <description>Hi,&lt;BR /&gt;Have you considered transposing your data (Rows become Column and reciprocaly)? You would then be able to use the Col Minimum and Col Maximum formulas.&lt;BR /&gt;Best,&lt;BR /&gt;TS</description>
      <pubDate>Tue, 13 Oct 2020 17:49:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/321261#M57135</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2020-10-13T17:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to script for finding maximum, minimum date value in a row for 100+ columns</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/321262#M57136</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/19742"&gt;@tonkatsu2020&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Something you might want to consider is whether or not your data table is "oriented" or arranged in the right way. Normally, you'd want to have a single column with data and then the rows would be each new instance of whatever it is you're looking at.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; You might consider transposing your data. Then, it's just easy to find the Col Maximum() and Col Minimum(). However, this might not be what you're after. Can you share an anonymized version of your table? That might help in understanding how your data is structured and what you want to do with it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 17:55:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/321262#M57136</guid>
      <dc:creator>SDF1</dc:creator>
      <dc:date>2020-10-13T17:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to script for finding maximum, minimum date value in a row for 100+ columns</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/321329#M57140</link>
      <description>&lt;P&gt;Here is a simple formula that will find all of the continuous columns in your data table, and then calculate the maximum value for those columns.&amp;nbsp; Just use it as the formula for a new column&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( Row() == 1,
	theList = Current Data Table() &amp;lt;&amp;lt; get column names( continuous )
);
Max( theLIst );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Oct 2020 19:22:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/321329#M57140</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-10-13T19:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to script for finding maximum, minimum date value in a row for 100+ columns</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/321525#M57157</link>
      <description>if i want to use only a range of columns, NOT all columns, how do i script this? Lets say i want to use only 10th column to 100th column for all the rows; how do i script this?</description>
      <pubDate>Wed, 14 Oct 2020 14:23:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/321525#M57157</guid>
      <dc:creator>tonkatsu2020</dc:creator>
      <dc:date>2020-10-14T14:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to script for finding maximum, minimum date value in a row for 100+ columns</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/321526#M57158</link>
      <description>I think it'd be simple. Just create a new column with formula Min(:Col1, :Col2,....,:Coln)&lt;BR /&gt;You can drag and drop all columns into the formula editor.</description>
      <pubDate>Wed, 14 Oct 2020 14:32:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/321526#M57158</guid>
      <dc:creator>ThuongLe</dc:creator>
      <dc:date>2020-10-14T14:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to script for finding maximum, minimum date value in a row for 100+ columns</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/321603#M57164</link>
      <description>how to specify the range in the script, what exact symbols/characters to use in the script? that's what i am interested in</description>
      <pubDate>Wed, 14 Oct 2020 15:24:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/321603#M57164</guid>
      <dc:creator>tonkatsu2020</dc:creator>
      <dc:date>2020-10-14T15:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to script for finding maximum, minimum date value in a row for 100+ columns</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/321656#M57168</link>
      <description>&lt;P&gt;Here's one way. Use 'Help &amp;gt; Scripting Index' and the 'JSL Scripting Guide' to understand whatever is unclear.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

// Make some data
nr = 100;
nc = 50;
dt = AsTable(J(nr, nc, RandomNormal(0, 1)));
dt &amp;lt;&amp;lt; setName("Some Random Continuous Columns");

// Define a contiguous range of columns to consider
startColNum = RandomInteger(1, Floor(nc/2));
endColNum = RandomInteger(Ceiling(nc/2), nc);

// Get the list of columns to include in the formulas
allCols = dt &amp;lt;&amp;lt; getColumnNames;
myCols = allCols[startColNum::endColNum];

// Add the required formulas
CMD = Expr(dt &amp;lt;&amp;lt; NewColumn("Row Maximum from Cols "||Char(startColNum)||" to "||Char(endColNum), Numeric, Continuous, Formula(Max(colsTBD))));
SubstituteInto(CMD, Expr(colsTBD), myCols);
CMD;
CMD = Expr(dt &amp;lt;&amp;lt; NewColumn("Row Minimum from Cols "||Char(startColNum)||" to "||Char(endColNum), Numeric, Continuous, Formula(Min(colsTBD))));
SubstituteInto(CMD, Expr(colsTBD), myCols);
CMD;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Oct 2020 15:58:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/321656#M57168</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2020-10-14T15:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to script for finding maximum, minimum date value in a row for 100+ columns</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/321657#M57169</link>
      <description>&lt;P&gt;If you want to only use the 10th through the end of the data table, you can change the elements in the list used for the column specification.&amp;nbsp; Here is a modification of the formula I previously submitted&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( Row() == 1,
	theList = Current Data Table() &amp;lt;&amp;lt; get column names(  );
        remove from( theList, 1, 9 );
);
Max( theLIst );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Documentation on List modification can be found in the Scripting Guide.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 16:00:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/321657#M57169</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-10-14T16:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to script for finding maximum, minimum date value in a row for 100+ columns</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/322839#M57272</link>
      <description>considering each column has values from each day; and i need to take the average of last 4 days data (average of 4 columns) and put this into a new column. how do i create a formula for this new column? where the references inside the formula will be changing every day?</description>
      <pubDate>Fri, 16 Oct 2020 20:19:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/322839#M57272</guid>
      <dc:creator>tonkatsu2020</dc:creator>
      <dc:date>2020-10-16T20:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to script for finding maximum, minimum date value in a row for 100+ columns</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/322841#M57274</link>
      <description>&lt;P&gt;Might this formula&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( Row() == 1,
	nc = N Cols( Current Data Table() )
);
Mean( As Column( nc - 4 ), As Column( nc - 3 ), 
	As Column( nc - 2 ), As Column( nc - 1 ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;be something in the direction you are looking for&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 20:29:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-script-for-finding-maximum-minimum-date-value-in-a-row/m-p/322841#M57274</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-10-16T20:29:23Z</dc:date>
    </item>
  </channel>
</rss>

