<?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 can I generate subset table in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/how-can-I-generate-subset-table/m-p/48684#M27688</link>
    <description>&lt;P&gt;Using the 'looping' idea, you could try:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

dt = DataTable("First Example");
cols = dt &amp;lt;&amp;lt; getColumnNames;

for(c1 = 1, c1&amp;lt;= NItems(cols), c1++,
	for(c2 = c1+1, c2 &amp;lt;= NItems(cols), c2++,
		dt &amp;lt;&amp;lt; Subset(Columns(cols[c1], cols[c2]));
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 15 Dec 2017 13:53:01 GMT</pubDate>
    <dc:creator>ian_jmp</dc:creator>
    <dc:date>2017-12-15T13:53:01Z</dc:date>
    <item>
      <title>how can I generate subset table</title>
      <link>https://community.jmp.com/t5/Discussions/how-can-I-generate-subset-table/m-p/48645#M27669</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have a table which contains 8 columns and I want to choose each two columns to be together for example ( column 1 with column 2,column 1 with column 3, until column 1 with column 8)&lt;/img&gt; then start with column 2 with column 3 until column 2 with column 8..... and finish with column 7 with column 8.&lt;/P&gt;
&lt;P&gt;i tried to use sebset but i faced a problem when i tried to make them as in general.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;this is what i did&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt2_5_2=New Table( "First Example",
 Add Rows( 17 ),
 New Column( "Column 1",
  Numeric,
  "Continuous",
  Format( "Best", 12 ),
  Set Values( [1, 0, 0, 0, -1, -1, -1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1] )
 ),
New Column( "Column 2",
  Numeric,
  "Continuous",
  Format( "Best", 12 ),
  Set Values( [-1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1] )
 ),
 New Column( "Column 3",
  Numeric,
  "Continuous",
  Format( "Best", 12 ),
  Set Values( [-1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1] )
 ),
 New Column( "Column 4",
  Numeric,
  "Continuous",
  Format( "Best", 12 ),
  Set Values( [-1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1] )
 ),
 New Column( "Column 5",
  Numeric,
  "Continuous",
  Format( "Best", 12 ),
  Set Values( [-1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1] )
 ),
 New Column( "Column 6",
  Numeric,
  "Continuous",
  Format( "Best", 12 ),
  Set Values( [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1] )
 ),
 New Column( "Column 7",
  Numeric,
  "Continuous",
  Format( "Best", 12 ),
  Set Values( [-1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1] )
 ),
 New Column( "Column 8",
  Numeric,
  "Continuous",
  Format( "Best", 12 ),
  Set Selected,
  Set Values( [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1] )
 ),
 Set Row States( [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] )
);

for (i=1,i&amp;lt;=8,i++,
    for (j=i+1,j&amp;lt;=8,j++,
      subDt1 = dt2_5_2 &amp;lt;&amp;lt; Subset(Columns([1,8]), Output Table Name("Sub"));
      eval(subDt1)
));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i tried to make subset&amp;nbsp;in general by using i and j but unfortunately did not work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;  (Subset(Columns([i,j]), Output Table Name("Sub"));)
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;so when i put number [1,8] then gave me&amp;nbsp;28 time same two numbers.&lt;/P&gt;
&lt;P&gt;i hope someone can help me and thank you for your considration&lt;/P&gt;
&lt;P&gt;Mohammed&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 14:43:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-can-I-generate-subset-table/m-p/48645#M27669</guid>
      <dc:creator>mohammed1405</dc:creator>
      <dc:date>2017-12-15T14:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: how can I generate subset table</title>
      <link>https://community.jmp.com/t5/Discussions/how-can-I-generate-subset-table/m-p/48647#M27670</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/10421"&gt;@mohammed1405&lt;/a&gt;,&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; It might be easier to think of subsetting using selected rows and columns and then expand it into a loop. Let me provide an example .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open("$SAMPLE_DATA/Cities.jmp");

dt &amp;lt;&amp;lt; Select Randomly(0.3); 

dt1 = dt &amp;lt;&amp;lt; Subset(Selected Rows(1),Selected Columns(0)); // Subsetting rows 

dt &amp;lt;&amp;lt; Clear Selection ; 

dt &amp;lt;&amp;lt; Select Columns({"city","State","Region"}); 

dt2 = dt &amp;lt;&amp;lt; Subset(Selected Rows(0),Selected Columns(1)); // Subsetting columns &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Dec 2017 19:56:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-can-I-generate-subset-table/m-p/48647#M27670</guid>
      <dc:creator>uday_guntupalli</dc:creator>
      <dc:date>2017-12-14T19:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: how can I generate subset table</title>
      <link>https://community.jmp.com/t5/Discussions/how-can-I-generate-subset-table/m-p/48684#M27688</link>
      <description>&lt;P&gt;Using the 'looping' idea, you could try:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

dt = DataTable("First Example");
cols = dt &amp;lt;&amp;lt; getColumnNames;

for(c1 = 1, c1&amp;lt;= NItems(cols), c1++,
	for(c2 = c1+1, c2 &amp;lt;= NItems(cols), c2++,
		dt &amp;lt;&amp;lt; Subset(Columns(cols[c1], cols[c2]));
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Dec 2017 13:53:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-can-I-generate-subset-table/m-p/48684#M27688</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2017-12-15T13:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: how can I generate subset table</title>
      <link>https://community.jmp.com/t5/Discussions/how-can-I-generate-subset-table/m-p/48761#M27718</link>
      <description>&lt;P&gt;thank you a lot jan that what i am looking for&amp;nbsp;&lt;/P&gt;&lt;P&gt;appreciate your time&lt;/P&gt;</description>
      <pubDate>Sat, 16 Dec 2017 06:03:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-can-I-generate-subset-table/m-p/48761#M27718</guid>
      <dc:creator>mohammed1405</dc:creator>
      <dc:date>2017-12-16T06:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: how can I generate subset table</title>
      <link>https://community.jmp.com/t5/Discussions/how-can-I-generate-subset-table/m-p/48762#M27719</link>
      <description>&lt;P&gt;&amp;nbsp;I have tried using selected rows but&amp;nbsp;unfortunately did not work for me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks a lot for reply&lt;/P&gt;</description>
      <pubDate>Sat, 16 Dec 2017 06:06:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-can-I-generate-subset-table/m-p/48762#M27719</guid>
      <dc:creator>mohammed1405</dc:creator>
      <dc:date>2017-12-16T06:06:50Z</dc:date>
    </item>
  </channel>
</rss>

