<?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: Arrange in rows by group in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Arrange-in-rows-by-group/m-p/62519#M33704</link>
    <description>&lt;P&gt;The code from txnelson does the job, &amp;nbsp;Though in his example I needed comment out the code line&lt;/P&gt;&lt;P&gt;//dt &amp;lt;&amp;lt; delete columns( Index( 9, 129 ) );&amp;nbsp;for it to run.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I must admit, I don't fully understand it and I stumbled a bit with this line&lt;/P&gt;&lt;P&gt;dt &lt;SPAN&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN&gt;&lt;STRONG&gt;select where&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN&gt;:&lt;/SPAN&gt;SID &lt;SPAN&gt;==&lt;/SPAN&gt; &lt;SPAN&gt;Num&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; SIDgrps&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN&gt;; since my ID is actually character. &amp;nbsp;I removed the Num() to get it to work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark's solution only does the by SID grouping but does not group the plots in rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jul 2018 13:28:05 GMT</pubDate>
    <dc:creator>Hegedus</dc:creator>
    <dc:date>2018-07-11T13:28:05Z</dc:date>
    <item>
      <title>Arrange in rows by group</title>
      <link>https://community.jmp.com/t5/Discussions/Arrange-in-rows-by-group/m-p/62449#M33678</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the problem I am trying to solve:&lt;/P&gt;&lt;P&gt;6 Y continuous variables (Y1,Y2,..Y6), same continuous X variable (1) and sample ID field (SID).&lt;/P&gt;&lt;P&gt;I am doing a BiVariate fit grouping by SID. I would like all 6 plots to be in a row and with each SID group.&lt;/P&gt;&lt;P&gt;SID=1&lt;/P&gt;&lt;P&gt;Y1,Y2,Y3,Y4,Y5,Y6,&lt;/P&gt;&lt;P&gt;SID=2&lt;/P&gt;&lt;P&gt;Y1,Y2,Y3,Y4,Y5,Y6,&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I script this? &amp;nbsp;The Y's and X are know and fixed while the number of sample IDs will vary.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 01:09:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Arrange-in-rows-by-group/m-p/62449#M33678</guid>
      <dc:creator>Hegedus</dc:creator>
      <dc:date>2018-07-11T01:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Arrange in rows by group</title>
      <link>https://community.jmp.com/t5/Discussions/Arrange-in-rows-by-group/m-p/62450#M33679</link>
      <description>&lt;P&gt;Here is an example script using a methodlogy I have used many times, that I think produces the results you want.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );

// Setup data to look somewhat like your data
dt &amp;lt;&amp;lt; delete columns( 1, 2, 3 );
Column( dt, 1 ) &amp;lt;&amp;lt; set name( "SID" );
Column( dt, 2 ) &amp;lt;&amp;lt; set name( "X" );
Column( dt, 3 ) &amp;lt;&amp;lt; set name( "Y1" );
Column( dt, 4 ) &amp;lt;&amp;lt; set name( "Y2" );
Column( dt, 5 ) &amp;lt;&amp;lt; set name( "Y3" );
Column( dt, 6 ) &amp;lt;&amp;lt; set name( "Y4" );
Column( dt, 7 ) &amp;lt;&amp;lt; set name( "Y5" );
Column( dt, 8 ) &amp;lt;&amp;lt; set name( "Y6" );
dt &amp;lt;&amp;lt; delete columns( Index( 9, 129 ) );

// Determine the number of SIDs
Summarize( dt, SIDgrps = by( SID ) );

// Create the output window
nw = New Window( "Report", MainVLB = V List Box() );

// Create a list to hold the data table names 
dtList = {};

// Setup what to do when the display window is closed
nw &amp;lt;&amp;lt; on close( For( i = 1, i &amp;lt;= N Items( SIDgrps ), i++, Close( dtList[i], nosave ) ) );

// Loop through the SIDs and generate the required reports
For( i = 1, i &amp;lt;= N Items( SIDgrps ), i++,
	dt &amp;lt;&amp;lt; select where( :SID == Num( SIDgrps[i] ) );
	dtSub = dt &amp;lt;&amp;lt; subset( selected rows( 1 ), selected columns( 0 ), invisible );
	Insert Into( dtList, dtSub );
	dtSub &amp;lt;&amp;lt; set name( "SID=" || SIDgrps[i] );
	ob = Outline Box( "SID=" || SIDgrps[i],
		H List Box(
			dtSub = Bivariate( Y( :Y1 ), X( :X ) ),
			dtSub = Bivariate( Y( :Y2 ), X( :X ) ),
			dtSub = Bivariate( Y( :Y3 ), X( :X ) ),
			dtSub = Bivariate( Y( :Y4 ), X( :X ) ),
			dtSub = Bivariate( Y( :Y5 ), X( :X ) ),
			dtSub = Bivariate( Y( :Y6 ), X( :X ) ),

		)
	);
	// Add the current set of reports to the main display
	MainVLB &amp;lt;&amp;lt; append( ob );
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Jul 2018 02:27:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Arrange-in-rows-by-group/m-p/62450#M33679</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-07-11T02:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Arrange in rows by group</title>
      <link>https://community.jmp.com/t5/Discussions/Arrange-in-rows-by-group/m-p/62509#M33695</link>
      <description>&lt;P&gt;From your description, it seems like all you have to do is use SID in the By role.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Bivariate(
	Y( :Y1, :Y2, :Y3, :Y4, :Y5, :Y6 ),
	X( :X ),
	By( :SID )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Jul 2018 12:16:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Arrange-in-rows-by-group/m-p/62509#M33695</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2018-07-11T12:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Arrange in rows by group</title>
      <link>https://community.jmp.com/t5/Discussions/Arrange-in-rows-by-group/m-p/62519#M33704</link>
      <description>&lt;P&gt;The code from txnelson does the job, &amp;nbsp;Though in his example I needed comment out the code line&lt;/P&gt;&lt;P&gt;//dt &amp;lt;&amp;lt; delete columns( Index( 9, 129 ) );&amp;nbsp;for it to run.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I must admit, I don't fully understand it and I stumbled a bit with this line&lt;/P&gt;&lt;P&gt;dt &lt;SPAN&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN&gt;&lt;STRONG&gt;select where&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN&gt;:&lt;/SPAN&gt;SID &lt;SPAN&gt;==&lt;/SPAN&gt; &lt;SPAN&gt;Num&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; SIDgrps&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN&gt;; since my ID is actually character. &amp;nbsp;I removed the Num() to get it to work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark's solution only does the by SID grouping but does not group the plots in rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 13:28:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Arrange-in-rows-by-group/m-p/62519#M33704</guid>
      <dc:creator>Hegedus</dc:creator>
      <dc:date>2018-07-11T13:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Arrange in rows by group</title>
      <link>https://community.jmp.com/t5/Discussions/Arrange-in-rows-by-group/m-p/62527#M33712</link>
      <description>&lt;P&gt;This shows one way to control the layout but the resulting array of plots is the transpose of what you want.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Window( "In a Row",
	Line Up Box( N Col( 2 ),
		Bivariate(
			Y( :age, :weight, :oxy, :runtime ),
			X( :runpulse ),
			By( :sex )
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Jul 2018 14:48:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Arrange-in-rows-by-group/m-p/62527#M33712</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2018-07-11T14:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Arrange in rows by group</title>
      <link>https://community.jmp.com/t5/Discussions/Arrange-in-rows-by-group/m-p/62529#M33714</link>
      <description>&lt;P&gt;I think this way might be simpler and give you the layout you want:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;
New Window( "Fitness - Bivariate",
	V List Box(
		Fit Group(
			Bivariate( Y( :Age ), X( :MaxPulse ) ),
			Bivariate( Y( :Weight ), X( :MaxPulse ) ),
			Bivariate( Y( :Oxy ), X( :MaxPulse ) ),
			Bivariate( Y( :Runtime ), X( :MaxPulse ) ),
			Bivariate( Y( :RunPulse ), X( :MaxPulse ) ),
			Bivariate( Y( :RstPulse ), X( :MaxPulse ) ),
			&amp;lt;&amp;lt;{Arrange in Rows( 2 )},
			By( :Sex )
		),
		Fit Group(
			Bivariate( Y( :Age ), X( :MaxPulse ) ),
			Bivariate( Y( :Weight ), X( :MaxPulse ) ),
			Bivariate( Y( :Oxy ), X( :MaxPulse ) ),
			Bivariate( Y( :Runtime ), X( :MaxPulse ) ),
			Bivariate( Y( :RunPulse ), X( :MaxPulse ) ),
			Bivariate( Y( :RstPulse ), X( :MaxPulse ) ),
			&amp;lt;&amp;lt;{Arrange in Rows( 2 )},
			By( :Sex )
		)
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Jul 2018 14:52:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Arrange-in-rows-by-group/m-p/62529#M33714</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2018-07-11T14:52:58Z</dc:date>
    </item>
  </channel>
</rss>

