<?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 select rows with a specific number that user input in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/how-to-select-rows-with-a-specific-number-that-user-input/m-p/60423#M32927</link>
    <description>&lt;P&gt;Just for fun, an alternate method.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt   = open("$sample_data/big class.jmp");
idx  = Random Shuffle( dt &amp;lt;&amp;lt;  Get Rows Where( Column( "sex" )[]== "F" ) );
//get the matching rows but mix up the order;
show(idx); //for demonstration

//use only 5 of them
dtsub =  &amp;lt;&amp;lt; Subset( rows(idx[1::5]), Output Table( "Best Modules" ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 15 Jun 2018 22:11:21 GMT</pubDate>
    <dc:creator>gzmorgan0</dc:creator>
    <dc:date>2018-06-15T22:11:21Z</dc:date>
    <item>
      <title>how to select rows with a specific number that user input</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-select-rows-with-a-specific-number-that-user-input/m-p/60292#M32867</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on a project that helps users to pick modules based on their input. For example, if user input 5, the script would give user 5 modules that been selected. Could anyone one help me with the "select" part?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2018 13:55:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-select-rows-with-a-specific-number-that-user-input/m-p/60292#M32867</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-19T13:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to select rows with a specific number that user input</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-select-rows-with-a-specific-number-that-user-input/m-p/60300#M32872</link>
      <description>&lt;P&gt;This should work&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt &amp;lt;&amp;lt; Select Where( Column( "Shippable to Reliability?" )[Row()] == 1 );
dtsub = dt &amp;lt;&amp;lt; Subset( Selected Rows( 1 ), Output Table( "Best Modules" ) );

dtsub &amp;lt;&amp;lt; New Column( "random", formula( Random Uniform() ) );

dtsub = dtsub &amp;lt;&amp;lt; sort( by( :random ), order( ascending ), replace table( 1 ) );

dtsub &amp;lt;&amp;lt; select where( Row() &amp;gt; 5 );
dtsub &amp;lt;&amp;lt; delete rows;&lt;BR /&gt;dtsub &amp;lt;&amp;lt; delete columns("random");&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Jun 2018 01:15:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-select-rows-with-a-specific-number-that-user-input/m-p/60300#M32872</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-06-14T01:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to select rows with a specific number that user input</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-select-rows-with-a-specific-number-that-user-input/m-p/60423#M32927</link>
      <description>&lt;P&gt;Just for fun, an alternate method.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt   = open("$sample_data/big class.jmp");
idx  = Random Shuffle( dt &amp;lt;&amp;lt;  Get Rows Where( Column( "sex" )[]== "F" ) );
//get the matching rows but mix up the order;
show(idx); //for demonstration

//use only 5 of them
dtsub =  &amp;lt;&amp;lt; Subset( rows(idx[1::5]), Output Table( "Best Modules" ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Jun 2018 22:11:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-select-rows-with-a-specific-number-that-user-input/m-p/60423#M32927</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-06-15T22:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to select rows with a specific number that user input</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-select-rows-with-a-specific-number-that-user-input/m-p/60578#M32990</link>
      <description>&lt;P&gt;Thank you so much for your help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 12:53:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-select-rows-with-a-specific-number-that-user-input/m-p/60578#M32990</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-19T12:53:47Z</dc:date>
    </item>
  </channel>
</rss>

