<?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 script group by to handle flexible numbers of groups in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-script-group-by-to-handle-flexible-numbers-of-groups/m-p/385185#M63540</link>
    <description>Hi,&lt;BR /&gt;I am getting an error around the i++ call in the last bit of the code. I don't see a variable, i, initialized earlier in the code. What does it refer to?&lt;BR /&gt;Andy</description>
    <pubDate>Fri, 14 May 2021 14:40:30 GMT</pubDate>
    <dc:creator>Hegedus1</dc:creator>
    <dc:date>2021-05-14T14:40:30Z</dc:date>
    <item>
      <title>How to script group by to handle flexible numbers of groups</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-script-group-by-to-handle-flexible-numbers-of-groups/m-p/384813#M63518</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Working on automating analysis and need to make the automated generated script more generic.&lt;/P&gt;&lt;P&gt;The work flow is to create a summary table grouped by three columns with four columns getting derived values. &amp;nbsp;That is fine.&lt;/P&gt;&lt;P&gt;Now I want to create oneway plots with one of the original grouping variables and also further group the plots by a second variable.&lt;/P&gt;&lt;P&gt;Grouping: Cycle, Step, Unique Step&lt;/P&gt;&lt;P&gt;4 separate Oneway by Cycle grouped Step.&lt;/P&gt;&lt;P&gt;The automatically generated script works on my test file fine. &amp;nbsp;The issue is how to make it more generic.&lt;/P&gt;&lt;P&gt;If I look at the script there are specific call outs for the step column value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;CODE class=" language-jsl"&gt;&amp;lt;&amp;lt;{Arrange in Rows(4)}, Where(:Step == 1), Where(:Step == 1))&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;And in the test case there are 19 values for step. &amp;nbsp;How should I go about crafting this to be flexible to the number of steps? &amp;nbsp;Various files will have different numbers of steps. What are best practices here? &amp;nbsp;My desired out come is to have the four plots in a row with the grouping box also having the value of the step shown (now it is in small text after the plots) and robots to the number of steps that an incoming file might have.&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt1=Data Table( dt) &amp;lt;&amp;lt;Summary(
	Group( :Unique Step, :Step, :Cycle ),
	Min( :"TV Pres (torr)"n ),
	Min( :"DS Pres (torr)"n ),
	Max( :"TV Pres (torr)"n ),
	Max( :"DS Pres (torr)"n ),
	Freq( "None" ),
	Weight( "None" )
);
New Window("Pressure Graphs", V List Box(
Fit Group(
Oneway(Y(:"Min(TV Pres (torr))"n), X(:Cycle), Quantiles(1), Means(1), Mean Diamonds(0), Box Plots(1), X Axis Proportional(0), Points Jittered(1), Grand Mean(0), SendToReport(Dispatch({}, "Oneway Plot", FrameBox, {DispatchSeg(BoxPlotSeg(1), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(2), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(3), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(4), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(5), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(6), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(7), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(8), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(9), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(10), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(11), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(12), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(13), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(14), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(15), {Confidence Diamond(0), Line Color("Red")})}), Dispatch({}, "Quantiles", OutlineBox, {Close(1)}), Dispatch({}, "Oneway Anova", OutlineBox, {Close(1)}), Dispatch({"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close(1)}))), 
Oneway(Y(:"Min(DS Pres (torr))"n), X(:Cycle), Quantiles(1), Means(1), Mean Diamonds(0), Box Plots(1), X Axis Proportional(0), Points Jittered(1), Grand Mean(0), SendToReport(Dispatch({}, "Oneway Plot", FrameBox, {DispatchSeg(BoxPlotSeg(1), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(2), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(3), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(4), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(5), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(6), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(7), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(8), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(9), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(10), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(11), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(12), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(13), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(14), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(15), {Confidence Diamond(0), Line Color("Red")})}), Dispatch({}, "Quantiles", OutlineBox, {Close(1)}), Dispatch({}, "Oneway Anova", OutlineBox, {Close(1)}), Dispatch({"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close(1)}))), 
Oneway(Y(:"Max(TV Pres (torr))"n), X(:Cycle), Quantiles(1), Means(1), Mean Diamonds(0), Box Plots(1), X Axis Proportional(0), Points Jittered(1), Grand Mean(0), SendToReport(Dispatch({}, "Oneway Plot", FrameBox, {DispatchSeg(BoxPlotSeg(1), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(2), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(3), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(4), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(5), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(6), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(7), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(8), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(9), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(10), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(11), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(12), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(13), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(14), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(15), {Confidence Diamond(0), Line Color("Red")})}), Dispatch({}, "Quantiles", OutlineBox, {Close(1)}), Dispatch({}, "Oneway Anova", OutlineBox, {Close(1)}), Dispatch({"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close(1)}))), 
Oneway(Y(:"Max(DS Pres (torr))"n), X(:Cycle), Quantiles(1), Means(1), Mean Diamonds(0), Box Plots(1), X Axis Proportional(0), Points Jittered(1), Grand Mean(0), SendToReport(Dispatch({}, "Oneway Plot", FrameBox, {DispatchSeg(BoxPlotSeg(1), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(2), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(3), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(4), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(5), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(6), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(7), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(8), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(9), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(10), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(11), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(12), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(13), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(14), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(15), {Confidence Diamond(0), Line Color("Red")})}), Dispatch({}, "Quantiles", OutlineBox, {Close(1)}), Dispatch({}, "Oneway Anova", OutlineBox, {Close(1)}), Dispatch({"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close(1)}))), 
&amp;lt;&amp;lt;{Arrange in Rows(4)}, Where(:Step == 1), Where(:Step == 1)), 
Fit Group(
Oneway(Y(:"Min(TV Pres (torr))"n), X(:Cycle), Quantiles(1), Means(1), Mean Diamonds(0), Box Plots(1), X Axis Proportional(0), Points Jittered(1), Grand Mean(0), SendToReport(Dispatch({}, "Oneway Plot", FrameBox, {DispatchSeg(BoxPlotSeg(1), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(2), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(3), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(4), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(5), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(6), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(7), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(8), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(9), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(10), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(11), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(12), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(13), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(14), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(15), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")})}), Dispatch({}, "Quantiles", OutlineBox, {Close(1)}), Dispatch({}, "Oneway Anova", OutlineBox, {Close(1)}), Dispatch({"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close(1)}))), 
Oneway(Y(:"Min(DS Pres (torr))"n), X(:Cycle), Quantiles(1), Means(1), Mean Diamonds(0), Box Plots(1), X Axis Proportional(0), Points Jittered(1), Grand Mean(0), SendToReport(Dispatch({}, "Oneway Plot", FrameBox, {DispatchSeg(BoxPlotSeg(1), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(2), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(3), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(4), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(5), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(6), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(7), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(8), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(9), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(10), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(11), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(12), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(13), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(14), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(15), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")})}), Dispatch({}, "Quantiles", OutlineBox, {Close(1)}), Dispatch({}, "Oneway Anova", OutlineBox, {Close(1)}), Dispatch({"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close(1)}))), 
Oneway(Y(:"Max(TV Pres (torr))"n), X(:Cycle), Quantiles(1), Means(1), Mean Diamonds(0), Box Plots(1), X Axis Proportional(0), Points Jittered(1), Grand Mean(0), SendToReport(Dispatch({}, "Oneway Plot", FrameBox, {DispatchSeg(BoxPlotSeg(1), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(2), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(3), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(4), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(5), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(6), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(7), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(8), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(9), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(10), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(11), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(12), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(13), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(14), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(15), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")})}), Dispatch({}, "Quantiles", OutlineBox, {Close(1)}), Dispatch({}, "Oneway Anova", OutlineBox, {Close(1)}), Dispatch({"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close(1)}))), 
Oneway(Y(:"Max(DS Pres (torr))"n), X(:Cycle), Quantiles(1), Means(1), Mean Diamonds(0), Box Plots(1), X Axis Proportional(0), Points Jittered(1), Grand Mean(0), SendToReport(Dispatch({}, "Oneway Plot", FrameBox, {DispatchSeg(BoxPlotSeg(1), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(2), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(3), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(4), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(5), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(6), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(7), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(8), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(9), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(10), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(11), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(12), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(13), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(14), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(15), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")})}), Dispatch({}, "Quantiles", OutlineBox, {Close(1)}), Dispatch({}, "Oneway Anova", OutlineBox, {Close(1)}), Dispatch({"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close(1)}))), 
&amp;lt;&amp;lt;{Arrange in Rows(4)}, Where(:Step == 2), Where(:Step == 2)), &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:46:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-script-group-by-to-handle-flexible-numbers-of-groups/m-p/384813#M63518</guid>
      <dc:creator>Hegedus1</dc:creator>
      <dc:date>2023-06-09T19:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to script group by to handle flexible numbers of groups</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-script-group-by-to-handle-flexible-numbers-of-groups/m-p/385023#M63533</link>
      <description>&lt;P&gt;Made some progress.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The major amount of work could be handled by using the "By" operator.&lt;/P&gt;&lt;P&gt;Still what is missing is how to get the groups arranged in groups of 4 so the plots for each by grouping are on the same line.&lt;/P&gt;&lt;P&gt;Any thoughts&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;view = dt1 &amp;lt;&amp;lt; Oneway(
	Y( {:"Min(TV Pres (torr))"n ,:"Min(DS Pres (torr))"n,:"Max(TV Pres (torr))"n, :"Max(DS Pres (torr))"n}),
	X( :Cycle ),
	by (:Step),
	Quantiles( 1 ),
	Means( 1 ),
	Mean Diamonds( 0 ),
	Box Plots( 1 ),
	X Axis Proportional( 0 ),
	Points Jittered( 1 ),
	Grand Mean( 0 ),
	SendToReport(
		Dispatch( {}, "Quantiles", OutlineBox, {Close( 1 )} ),
		Dispatch( {}, "Oneway Anova", OutlineBox, {Close( 1 )} ),
		Dispatch( {"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close( 1 )} )

	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 May 2021 23:05:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-script-group-by-to-handle-flexible-numbers-of-groups/m-p/385023#M63533</guid>
      <dc:creator>Hegedus1</dc:creator>
      <dc:date>2021-05-13T23:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to script group by to handle flexible numbers of groups</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-script-group-by-to-handle-flexible-numbers-of-groups/m-p/385060#M63534</link>
      <description>&lt;P&gt;Below is an example that puts the 4 graphs into a single row, and a row for each column specified in the analysis&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="four.PNG" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/32833i45F3E3DB80D0853D/image-size/large?v=v2&amp;amp;px=999" role="button" title="four.PNG" alt="four.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt1 = Open( "$SAMPLE_DATA\big class.jmp" );
// restrict to 4 ages to match the 4 level requirement
dt1 &amp;lt;&amp;lt; select where( :age &amp;gt;= 16 );
dt1 &amp;lt;&amp;lt; delete rows;
	
// Create a window to place the output in
nw = New Window( "test", lub = Lineup Box( N Col( 4 ) ) );

// Run the analysis with a By clause
view = dt1 &amp;lt;&amp;lt; Oneway(
	invisible,
	Y( :height, :weight ),
	X( :sex ),
	Quantiles( 1 ),
	Means( 1 ),
	Box Plots( 1 ),
	Mean Diamonds( 1 ),
	by( :age ),
	SendToReport(
		Dispatch( {}, "Quantiles", OutlineBox, {Close( 1 )} ),
		Dispatch( {}, "Oneway Anova", OutlineBox, {Close( 1 )} ),
		Dispatch( {"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close( 1 )} )
	)
);

// Take the elements from the outout and place in the window
// The display produces all levels of the by across one level 
// of by group and then moves onto the next by group.  Therefore
// the displays need to be picked across the full range of outputs
// to get the four grqaphs aligned
numCols = N Items( view ) / 4;
For( col = 1, col &amp;lt;= numCols, col++,
	For( theRow = 1, theRow &amp;lt;= 4, theRow++,
		lub &amp;lt;&amp;lt; append( Report( view[(theRow - 1) * numCols + col] ) );
		i++;
	)
)
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;CODE class=" language-jsl"&gt;
&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 04:29:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-script-group-by-to-handle-flexible-numbers-of-groups/m-p/385060#M63534</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-05-14T04:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to script group by to handle flexible numbers of groups</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-script-group-by-to-handle-flexible-numbers-of-groups/m-p/385185#M63540</link>
      <description>Hi,&lt;BR /&gt;I am getting an error around the i++ call in the last bit of the code. I don't see a variable, i, initialized earlier in the code. What does it refer to?&lt;BR /&gt;Andy</description>
      <pubDate>Fri, 14 May 2021 14:40:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-script-group-by-to-handle-flexible-numbers-of-groups/m-p/385185#M63540</guid>
      <dc:creator>Hegedus1</dc:creator>
      <dc:date>2021-05-14T14:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to script group by to handle flexible numbers of groups</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-script-group-by-to-handle-flexible-numbers-of-groups/m-p/385245#M63543</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you very much txnelson! Made some tweaks, simplified it and got it working&lt;/P&gt;&lt;P&gt;I worked this a bit and came to a solution. &amp;nbsp;The arraigning of the plots can be simplified since the new window sets they receiving box to have a arrangement of 4 plots and in my case I want every four to go together in a row, I can simply fill from the start in a simple loop. &amp;nbsp;Just count the number of items and loop through and add them to the box.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;view = dt1 &amp;lt;&amp;lt; Oneway(
	Y( {:"Min(TV Pres (torr))"n ,:"Min(DS Pres (torr))"n,:"Max(TV Pres (torr))"n, :"Max(DS Pres (torr))"n}),
	X( :Cycle ),
	by (:Step),
	Quantiles( 1 ),
	Means( 1 ),
	Mean Diamonds( 0 ),
	Box Plots( 1 ),
	X Axis Proportional( 0 ),
	Points Jittered( 1 ),
	Grand Mean( 0 ),
	SendToReport(
		Dispatch( {}, "Quantiles", OutlineBox, {Close( 1 )} ),
		Dispatch( {}, "Oneway Anova", OutlineBox, {Close( 1 )} ),
		Dispatch( {"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close( 1 )} )	
	
	)
);
nw = New Window( "test", lub = Lineup Box( N Col( 4 ) ) );
numRows = N Items( view );
For( theRow = 1, theRow &amp;lt;= numRows, theRow++,
		lub &amp;lt;&amp;lt; append( Report(view[(theRow)]) &lt;BR /&gt;   );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 15:03:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-script-group-by-to-handle-flexible-numbers-of-groups/m-p/385245#M63543</guid>
      <dc:creator>Hegedus1</dc:creator>
      <dc:date>2021-05-14T15:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to script group by to handle flexible numbers of groups</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-script-group-by-to-handle-flexible-numbers-of-groups/m-p/385897#M63605</link>
      <description>&lt;P&gt;Could you use a Line Up Box?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Window( "Row-Wise",
	Line Up Box( N Col(2),
		Oneway( Y( :weight ), X( :sex), By( :age ))
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 May 2021 17:15:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-script-group-by-to-handle-flexible-numbers-of-groups/m-p/385897#M63605</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2021-05-17T17:15:49Z</dc:date>
    </item>
  </channel>
</rss>

