<?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: col&amp;lt;&amp;lt;get values for non-excluded rows? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/col-lt-lt-get-values-for-non-excluded-rows/m-p/564109#M77666</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;nonExcluded = dt &amp;lt;&amp;lt; get rows where( Excluded( Row State( Row() ) ) == 0 );&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 03 Nov 2022 09:13:59 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2022-11-03T09:13:59Z</dc:date>
    <item>
      <title>col&lt;&lt;get values for non-excluded rows?</title>
      <link>https://community.jmp.com/t5/Discussions/col-lt-lt-get-values-for-non-excluded-rows/m-p/3954#M3954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anyone know of any 'simple' syntax to do this?&amp;nbsp; col&amp;lt;&amp;lt;get values gets all of the column's row values (excluded, included, etc).&amp;nbsp; Would be cool if their was some obscure JSL column message to get a column's rows which are not excluded.&amp;nbsp; Let me know if you know... thx, dj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Nov 2011 21:53:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/col-lt-lt-get-values-for-non-excluded-rows/m-p/3954#M3954</guid>
      <dc:creator>djhanson</dc:creator>
      <dc:date>2011-11-05T21:53:05Z</dc:date>
    </item>
    <item>
      <title>col&lt;&lt;get values for non-excluded rows?</title>
      <link>https://community.jmp.com/t5/Discussions/col-lt-lt-get-values-for-non-excluded-rows/m-p/3955#M3955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not pretty but it returns a matrix of the values of non-excluded rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 15.0px Courier;"&gt;col&lt;STRONG&gt;[&lt;/STRONG&gt;dt &lt;SPAN style="color: #130098;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; select where&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #2400eb;"&gt;Excluded&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #2400eb;"&gt;Row State&lt;/SPAN&gt;&lt;STRONG&gt;()&lt;/STRONG&gt;&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;SPAN style="color: #130098;"&gt;!=&lt;/SPAN&gt; &lt;SPAN style="color: #009695;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;SPAN style="color: #130098;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; get selected rows&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Nov 2011 22:49:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/col-lt-lt-get-values-for-non-excluded-rows/m-p/3955#M3955</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2011-11-05T22:49:23Z</dc:date>
    </item>
    <item>
      <title>col&lt;&lt;get values for non-excluded rows?</title>
      <link>https://community.jmp.com/t5/Discussions/col-lt-lt-get-values-for-non-excluded-rows/m-p/3956#M3956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MS, thanks a bunch!&amp;nbsp; That's exactly what I was looking for and works perfectly for my needs &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.jmp.com/4.5.5/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;.&amp;nbsp; dj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Nov 2011 23:14:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/col-lt-lt-get-values-for-non-excluded-rows/m-p/3956#M3956</guid>
      <dc:creator>djhanson</dc:creator>
      <dc:date>2011-11-05T23:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: col&lt;&lt;get values for non-excluded rows?</title>
      <link>https://community.jmp.com/t5/Discussions/col-lt-lt-get-values-for-non-excluded-rows/m-p/556579#M77051</link>
      <description>&lt;P&gt;Very old post ...&lt;BR /&gt;is there now a better way to do this?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Why is there a&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Get Excluded Rows();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but no&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Get nonExcluded Rows();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;?&lt;/P&gt;</description>
      <pubDate>Sat, 15 Oct 2022 14:40:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/col-lt-lt-get-values-for-non-excluded-rows/m-p/556579#M77051</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2022-10-15T14:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: col&lt;&lt;get values for non-excluded rows?</title>
      <link>https://community.jmp.com/t5/Discussions/col-lt-lt-get-values-for-non-excluded-rows/m-p/564103#M77664</link>
      <description>&lt;P&gt;what is the fastest way to get&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="language-jsl"&gt;&lt;CODE&gt;dt &amp;lt;&amp;lt; Get nonExcluded Rows();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in JMP 17 for a data set with 10 mio rows - without changing the selection?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 06:41:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/col-lt-lt-get-values-for-non-excluded-rows/m-p/564103#M77664</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2022-11-03T06:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: col&lt;&lt;get values for non-excluded rows?</title>
      <link>https://community.jmp.com/t5/Discussions/col-lt-lt-get-values-for-non-excluded-rows/m-p/564109#M77666</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;nonExcluded = dt &amp;lt;&amp;lt; get rows where( Excluded( Row State( Row() ) ) == 0 );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Nov 2022 09:13:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/col-lt-lt-get-values-for-non-excluded-rows/m-p/564109#M77666</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-11-03T09:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: col&lt;&lt;get values for non-excluded rows?</title>
      <link>https://community.jmp.com/t5/Discussions/col-lt-lt-get-values-for-non-excluded-rows/m-p/564136#M77669</link>
      <description>&lt;P&gt;Not sure about the fastest but this should work (it might need some additional error handling)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
/* init */
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt &amp;lt;&amp;lt; Select Rows([2,3,4,30]) &amp;lt;&amp;lt; Exclude(1) &amp;lt;&amp;lt; Clear Select;

// get row indices
excl_rows = dt &amp;lt;&amp;lt; Get Excluded Rows;
all_rows = 1::N Rows(dt);
all_rows[excl_rows] = .;
all_rows = Loc(all_rows);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also a good idea to keep in mind that fastest isn't always the best&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 10:31:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/col-lt-lt-get-values-for-non-excluded-rows/m-p/564136#M77669</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-11-03T10:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: col&lt;&lt;get values for non-excluded rows?</title>
      <link>https://community.jmp.com/t5/Discussions/col-lt-lt-get-values-for-non-excluded-rows/m-p/564380#M77688</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also added a version which scales linearly with # of excluded rows (ecluded rows are removed one by one).&lt;/P&gt;&lt;P&gt;It's quite competitive for small numbers of excluded rows, but performs worse and worse for large numbers.&lt;/P&gt;&lt;P&gt;Around 200 excluded rows it reached the performance of Jim's version and gets then really bad ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In addition, I found a version ("Jim X"), which is ~ factor 2 faster than Jim's version - and even shorter code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;	nonExludedRows = dt &amp;lt;&amp;lt; get rows where( Excluded() == 0 );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Most important:&lt;/P&gt;&lt;P&gt;Jarmo's version is by far the best.&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_4-1667508531636.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/46881iC5718A32059D8FB7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_4-1667508531636.png" alt="hogi_4-1667508531636.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = New Table( "dummy table" );
NR = 10E6;
dt &amp;lt;&amp;lt; add rows( NR );
dt &amp;lt;&amp;lt; New Column( "random", set each value( Random Uniform( 0, 100 ) ) );

For Each( {percent, idx},
	{0.00001, 0.00002, 0.00005, 0.0001, 0.0002, 0.0005, 0.001, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 15, 20, 30, 40, 50, 60,
	70, 80, 90, 100},
	Print( percent );
	dt &amp;lt;&amp;lt; Clear Row States;
	dt &amp;lt;&amp;lt; select where( :random &amp;lt; percent );
	dt &amp;lt;&amp;lt; Hide and Exclude;
	nexcl = N Rows( dt &amp;lt;&amp;lt; Get Excluded Rows );
	dt &amp;lt;&amp;lt; Clear Select;
	Wait();

	// Jim
	bt = HP Time();
	allRows = dt &amp;lt;&amp;lt; get rows where( Excluded( Row State( Row() ) ) == 0 );
	et = HP Time();
	time1 = et - bt;
	
	// Jim X
	bt = HP Time();
	allRows = dt &amp;lt;&amp;lt; get rows where( Excluded() == 0 );
	et = HP Time();
	time2 = et - bt;

	// Jarmo
	bt = HP Time();
	excl_rows = dt &amp;lt;&amp;lt; Get Excluded Rows;
	et = HP Time();
	time3a = et - bt;
	all_rows = 1 :: N Rows( dt );
	all_rows[excl_rows] = .;
	all_rows = Loc(all_rows);
	et = HP Time();
	time3 = et - bt;
	

	// hogi
	If( idx &amp;lt; 11,
		bt = HP Time();
		excl = dt &amp;lt;&amp;lt; Get Excluded Rows;
		allRows = (1 :: N Rows( dt ));
		For Each( {i, j}, Reverse( excl ), Remove From( allRows, i, 1 ) );
		et = HP Time();
		time4 = et - bt;
	);

	Wait();

	If( idx == 1,
		New Window( "timing results",
			tb = Table Box(
				Number Col Box( "# excluded", {Nexcl} ),
				Number Col Box( "Jim", {time1 / 1000000} ),
				Number Col Box( "Jim X", {time2 / 1000000} ),
				Number Col Box( "Jarmo", {time3 / 1000000} ),
				Number Col Box( "Jarmo (get ... rows)", {time3a / 1000000} ),
				Number Col Box( "hogi", {time4 / 1000000} ), 
				
			)
		)
	,
		If( idx &amp;lt; 11,
			tb &amp;lt;&amp;lt; add row( {Nexcl, time1 / 1000000, time2 / 1000000, time3 / 1000000,time3a / 1000000, time4 / 1000000} ),
			tb &amp;lt;&amp;lt; add row( {Nexcl, time1 / 1000000, time2 / 1000000, time3 / 1000000, time3a / 1000000} )
		)
		
	);
);

results = tb &amp;lt;&amp;lt; Make Combined Data Table;

gb = results &amp;lt;&amp;lt; Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :"# excluded"n ), Y( :Jim ), Y( :Jim X, Position( 1 ) ), Y( :Jarmo, Position( 1 ) ), Y( :hogi, Position( 1 ) ) ),
	Elements( Points( X, Y( 1 ), Y( 2 ), Y( 3 ), Y( 4 ), Legend( 5 ) ), Smoother( X, Y( 1 ), Y( 2 ), Y( 3 ), Y( 4 ), Legend( 6 ), Lambda( 0.001 ) ) )
);

Report( gb )[AxisBox( 1 )] &amp;lt;&amp;lt; {Scale( "Log" ), Min( 1 ), Max( 10000000 )};
Report( gb )[AxisBox( 2 )] &amp;lt;&amp;lt; {Scale( "Log" ), Min( 0.1 ), Max( 10 ),Label Row( Show Minor Grid( 1 ) )};
Report( gb )[Text Edit Box( 4 )] &amp;lt;&amp;lt; Set Text( "time [s]" )&amp;nbsp;&lt;/CODE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;/LI-SPOILER&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Dec 2022 15:16:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/col-lt-lt-get-values-for-non-excluded-rows/m-p/564380#M77688</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2022-12-04T15:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: col&lt;&lt;get values for non-excluded rows?</title>
      <link>https://community.jmp.com/t5/Discussions/col-lt-lt-get-values-for-non-excluded-rows/m-p/619448#M81887</link>
      <description>&lt;P&gt;Thank you for the suggestions. JMP 18 will implement a new series of JSL functions that improves the performance and readability of the specific query discussed here and other similar queries. Documentation has been updated also to reflect the preferred/faster methods.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The JSL looks something like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//instead of Get Rows Where()
Where( dt, Excluded() );
Where( dt, !Excluded() );
Where( dt, Hidden() );
Where( dt, !Hidden() );
Where( dt, Labeled() ); 
Where( dt, !Labeled() );
Where( dt, Is Missing() );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Apr 2023 12:59:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/col-lt-lt-get-values-for-non-excluded-rows/m-p/619448#M81887</guid>
      <dc:creator>Audrey_Shull</dc:creator>
      <dc:date>2023-04-03T12:59:56Z</dc:date>
    </item>
  </channel>
</rss>

