<?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 use JMP software JSL to efficiently find the minimum value？ in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-use-JMP-software-JSL-to-efficiently-find-the-minimum/m-p/658914#M84820</link>
    <description>&lt;P&gt;Is this what you are looking for&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dtsub &amp;lt;&amp;lt; New Column( "mi",
	set each value( Min( dtsub[Row(), 8 :: 13] ) )
);

dtsub &amp;lt;&amp;lt; New Column( "ix",
	set each value(
		theList = dtsub[Row(), 8 :: 13];
		val = Loc( theList, Min( theList ) );
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 17 Jul 2023 03:47:07 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2023-07-17T03:47:07Z</dc:date>
    <item>
      <title>How to use JMP software JSL to efficiently find the minimum value？</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JMP-software-JSL-to-efficiently-find-the-minimum/m-p/658889#M84816</link>
      <description>&lt;P&gt;How to use JMP software JSL to efficiently find the minimum value in the same row, multiple columns, and the rank of the column in which the minimum value resides.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" );
New Column( "mi" );
New Column( "ix" );
Column( "mi" ) &amp;lt;&amp;lt; Formula( ？ );
dt &amp;lt;&amp;lt; run formulas;
Column( "mi" ) &amp;lt;&amp;lt; deleteFormula;
Column( "ix" ) &amp;lt;&amp;lt; Formula( ？ );
dt &amp;lt;&amp;lt; run formulas;
Column( "ix" ) &amp;lt;&amp;lt; deleteFormula;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-07-17_10-38-52.png" style="width: 726px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/54782i7A419EC82D656580/image-size/large?v=v2&amp;amp;px=999" role="button" title="2023-07-17_10-38-52.png" alt="2023-07-17_10-38-52.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 02:44:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JMP-software-JSL-to-efficiently-find-the-minimum/m-p/658889#M84816</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-07-17T02:44:14Z</dc:date>
    </item>
    <item>
      <title>回复： How to use JMP software JSL to efficiently find the minimum value？</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JMP-software-JSL-to-efficiently-find-the-minimum/m-p/658892#M84817</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Column( "mi" ) &amp;lt;&amp;lt; Formula(r=row();min( dt[r,8::13]) );
Column( "ix" ) &amp;lt;&amp;lt; Formula(r=row();contains(dt[r,8::13],min( dt[r,8::13]) ));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Jul 2023 03:23:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JMP-software-JSL-to-efficiently-find-the-minimum/m-p/658892#M84817</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-07-17T03:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JMP software JSL to efficiently find the minimum value？</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JMP-software-JSL-to-efficiently-find-the-minimum/m-p/658914#M84820</link>
      <description>&lt;P&gt;Is this what you are looking for&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dtsub &amp;lt;&amp;lt; New Column( "mi",
	set each value( Min( dtsub[Row(), 8 :: 13] ) )
);

dtsub &amp;lt;&amp;lt; New Column( "ix",
	set each value(
		theList = dtsub[Row(), 8 :: 13];
		val = Loc( theList, Min( theList ) );
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Jul 2023 03:47:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JMP-software-JSL-to-efficiently-find-the-minimum/m-p/658914#M84820</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-07-17T03:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JMP software JSL to efficiently find the minimum value？</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JMP-software-JSL-to-efficiently-find-the-minimum/m-p/658943#M84821</link>
      <description>&lt;P&gt;First get the indices or names of the columns you wish to find the values from and then either use Min to get minimum value and &lt;A href="https://www.jmp.com/support/help/en/17.0/#page/jmp/matrix-functions.shtml?os=win&amp;amp;source=application#ww2682950" target="_self"&gt;Loc()&lt;/A&gt;&amp;nbsp;to find the value OR use &lt;A href="https://www.jmp.com/support/help/en/17.0/#page/jmp/matrix-functions.shtml?os=win&amp;amp;source=application#ww2682975" target="_self"&gt;Loc Min()&lt;/A&gt;&amp;nbsp;to find index and then that index to find the minimum value. Below is example using Loc Min to get index and then the value&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/PopAgeGroup.jmp");

// get either index or name of columns of interest
cols_of_interest = Filter Each({col_name}, dt &amp;lt;&amp;lt; Get Column Names(Continuous, "String"),
	!IsMissing(Regex(col_name, "^(Portion|F Rate).*[\d+]$"))
);

dt &amp;lt;&amp;lt; New Column("MinIdx", Numeric, Continuous, &amp;lt;&amp;lt; Set Each Value(
	Loc Min(dt[Row(), cols_of_interest])
));

dt &amp;lt;&amp;lt; New Column("MinVal", Numeric, Continuous, &amp;lt;&amp;lt; Set Each Value(
	dt[Row(), cols_of_interest[:MinIdx]]
));
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also if you have no need for formulas, it is better to not use them and rather use &amp;lt;&amp;lt; Set Each Value.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 06:54:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JMP-software-JSL-to-efficiently-find-the-minimum/m-p/658943#M84821</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-07-17T06:54:33Z</dc:date>
    </item>
  </channel>
</rss>

