<?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: Randomly select rows within a given column value in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Randomly-select-rows-within-a-given-column-value/m-p/602622#M80598</link>
    <description>&lt;P&gt;Thanks! I completely missed the 'stratify' option, it was indeed very simple ;).&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Feb 2023 15:01:54 GMT</pubDate>
    <dc:creator>Nico_M</dc:creator>
    <dc:date>2023-02-17T15:01:54Z</dc:date>
    <item>
      <title>Randomly select rows within a given column value</title>
      <link>https://community.jmp.com/t5/Discussions/Randomly-select-rows-within-a-given-column-value/m-p/602577#M80594</link>
      <description>&lt;P&gt;Hello everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First of all, I'm an occasional JMP user (v16.2) with little JSL experience and limited statistical knowledge. I couldn't directly find an answer on the community, I hope I'm not asking something which has already been answered. That being said, I've been trying to figure out how to do the question below 'manually' - using standard JMP functionalities. I couldn't find any simple way, so I hope somebody can give me a hint using JSL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a particular application request I would like to subset a large data table. More specifically, I would like to subset the table by randomly taking out a number of rows, for a specific column value. For example, I'd like to transfer the table attached to a new table, where I can obtain 3 (randomly chosen) values of column "Numerics" for each column value of column "condition".&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Apart from the JSL solution, is there maybe a way to do this using any of the statistical platforms?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:34:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Randomly-select-rows-within-a-given-column-value/m-p/602577#M80594</guid>
      <dc:creator>Nico_M</dc:creator>
      <dc:date>2023-06-08T16:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Randomly select rows within a given column value</title>
      <link>https://community.jmp.com/t5/Discussions/Randomly-select-rows-within-a-given-column-value/m-p/602604#M80597</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/46724"&gt;@Nico_M&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Welcome in the Community !&lt;/P&gt;
&lt;P&gt;If I understood correctly your need, you should be able to do this using the "Subset" platform in menu "Tables" :&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Click on menu "Tables", then "Subset" ; a new window opens,&lt;/LI&gt;
&lt;LI&gt;Specify "random - sample size" as 3 (or any number of rows you want per condition) and select stratify and choose the column "Condition" (as shown in the screenshot) :&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Victor_G_0-1676645019872.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50256iFADF7908DBA80F32/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Victor_G_0-1676645019872.png" alt="Victor_G_0-1676645019872.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;Click on "Ok" and you'll get a new subset table :)&lt;/img&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the JSL code on your example if you want to directly use it :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Data Table( "JMP replicates - community" ) &amp;lt;&amp;lt; Subset(
	Sample Size( 3 ),
	Selected columns only( 0 ),
	Stratify( :Condition )
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I also send you back your datatable with the Subset table saved as a new script.&lt;/P&gt;
&lt;P&gt;Hope this answer will help you,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 14:48:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Randomly-select-rows-within-a-given-column-value/m-p/602604#M80597</guid>
      <dc:creator>Victor_G</dc:creator>
      <dc:date>2023-02-17T14:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Randomly select rows within a given column value</title>
      <link>https://community.jmp.com/t5/Discussions/Randomly-select-rows-within-a-given-column-value/m-p/602622#M80598</link>
      <description>&lt;P&gt;Thanks! I completely missed the 'stratify' option, it was indeed very simple ;).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 15:01:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Randomly-select-rows-within-a-given-column-value/m-p/602622#M80598</guid>
      <dc:creator>Nico_M</dc:creator>
      <dc:date>2023-02-17T15:01:54Z</dc:date>
    </item>
  </channel>
</rss>

