<?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: jsl: how to plot using a list of groups? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/jsl-how-to-plot-using-a-list-of-groups/m-p/470857#M71503</link>
    <description>&lt;P&gt;Many thanks that solved the problem.&amp;nbsp; My post reading had not discovered the get function to draw out the information I required.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Mar 2022 15:33:20 GMT</pubDate>
    <dc:creator>TDF</dc:creator>
    <dc:date>2022-03-17T15:33:20Z</dc:date>
    <item>
      <title>jsl: how to plot using a list of groups?</title>
      <link>https://community.jmp.com/t5/Discussions/jsl-how-to-plot-using-a-list-of-groups/m-p/470443#M71465</link>
      <description>&lt;P&gt;following up from this post:&amp;nbsp;&lt;A href="https://community.jmp.com/t5/Discussions/Script-to-loop-thru-and-group-columns-by-name-dynamically/m-p/470274#M71439" target="_blank" rel="noopener"&gt;https://community.jmp.com/t5/Discussions/Script-to-loop-thru-and-group-columns-by-name-dynamically/m-p/470274#M71439&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm grouping 10k+ columns into groups by StepID, but now trying to plot them all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't quite figure out how to tell it to plot by the list of all the groups. any advice?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aliegner1_0-1647456188001.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/40872i2CA8A3C6605206F5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aliegner1_0-1647456188001.png" alt="aliegner1_0-1647456188001.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;/*plotting a basic Fit YbyX just to get pValues. Formatting and style done on final plot*/
ow1 = Oneway(
	Y( dtAggWide&amp;lt;&amp;lt;get column group( "10.0.0.0.0.0" ) ),
	X( :ChamberId ),
	//By(:),
	
	//All pairs Tukey HSD test
	All Pairs(
		1,
		Confidence Quantile( 0 ),
		Difference Matrix( 0 ),
		LSD Threshold Matrix( 0 ),
		Connecting Letters Report( 0 ),
		Ordered Differences Report( 1 )
	),
	//invisible, //use this to speed up.
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:13:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/jsl-how-to-plot-using-a-list-of-groups/m-p/470443#M71465</guid>
      <dc:creator>aliegner1</dc:creator>
      <dc:date>2023-06-09T18:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: jsl: how to plot using a list of groups?</title>
      <link>https://community.jmp.com/t5/Discussions/jsl-how-to-plot-using-a-list-of-groups/m-p/470465#M71466</link>
      <description>&lt;P&gt;You can most likely do it with something like this (you need EvalEvalExpr):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt &amp;lt;&amp;lt; Group Columns("group1", {"height", "weight"});

Eval(
	EvalExpr(
		dt &amp;lt;&amp;lt; Oneway(
			Y(Expr(dt &amp;lt;&amp;lt; Get Column Group("group1"))), 
			X(:age)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;See &lt;LI-MESSAGE title="Insert one expression into another using Eval Insert, Eval Expr, Parse, and Substitute" uid="48998" url="https://community.jmp.com/t5/JSL-Cookbook/Insert-one-expression-into-another-using-Eval-Insert-Eval-Expr/m-p/48998#U48998" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt; for more information and examples about Eval(EvalExpr())&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 19:49:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/jsl-how-to-plot-using-a-list-of-groups/m-p/470465#M71466</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-03-16T19:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: jsl: how to plot using a list of groups?</title>
      <link>https://community.jmp.com/t5/Discussions/jsl-how-to-plot-using-a-list-of-groups/m-p/470467#M71467</link>
      <description>&lt;P&gt;I'm sorry, i'm struggling here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure why nesting the evalexpr?&lt;/P&gt;&lt;P&gt;is there not a way to replace the&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="jsl"&gt;Y( dtAggWide&amp;lt;&amp;lt;get column group( "10.0.0.0.0.0" ) ),&lt;/LI-CODE&gt;&lt;P&gt;with a list of column groups?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I previously created this list, how can I swap this RecipeStepIndex into the Y groups&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//Build and prefill an Array of names of the RecipeStepId
Summarize( dt, RecipeStepIndex = by( :RecipeStepId) );//get list of unique RecipeStepID's&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aliegner1_0-1647461547191.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/40876iA686BFFE4C10DBE1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aliegner1_0-1647461547191.png" alt="aliegner1_0-1647461547191.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 20:12:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/jsl-how-to-plot-using-a-list-of-groups/m-p/470467#M71467</guid>
      <dc:creator>aliegner1</dc:creator>
      <dc:date>2022-03-16T20:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: jsl: how to plot using a list of groups?</title>
      <link>https://community.jmp.com/t5/Discussions/jsl-how-to-plot-using-a-list-of-groups/m-p/470512#M71470</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OK, so I've got this, but I'm not sure how I can keep looping and creating new terms inside the Y( section.&lt;/P&gt;&lt;P&gt;any advice?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;colgroupNames = dt &amp;lt;&amp;lt; get column groups names;&lt;BR /&gt;&lt;BR /&gt;/*plotting a basic Fit YbyX just to get pValues. Formatting and style done on final plot*/&lt;BR /&gt;ow1 = Oneway(&lt;BR /&gt;Y( dtAggWide&amp;lt;&amp;lt;get column group( colgroupNames[1] ) &lt;BR /&gt;, dtAggWide&amp;lt;&amp;lt;get column group( colgroupNames[2] )&lt;BR /&gt;, dtAggWide&amp;lt;&amp;lt;get column group( colgroupNames[3] )&lt;BR /&gt;),&lt;BR /&gt;X( :ChamberId ),&lt;BR /&gt;//By(:),&lt;BR /&gt;&lt;BR /&gt;//All pairs Tukey HSD test&lt;BR /&gt;All Pairs(&lt;BR /&gt;1,&lt;BR /&gt;Confidence Quantile( 0 ),&lt;BR /&gt;Difference Matrix( 0 ),&lt;BR /&gt;LSD Threshold Matrix( 0 ),&lt;BR /&gt;Connecting Letters Report( 0 ),&lt;BR /&gt;Ordered Differences Report( 1 )&lt;BR /&gt;),&lt;BR /&gt;//invisible, //use this to speed up.&lt;BR /&gt;);dtAggWide = current data table();
dtAggWide &amp;lt;&amp;lt; set name( "AggWide");

RecipeStepIndex ={"10.0.0.0.0.0", "11.0.0.0.0.0", "12.0.0.0.0.0"} // column groups names. Each group has 100+ columns.

//trying to create a series of charts using the groups, looping through the groups
ow1 = Oneway(
	Y( 	for( i = 1, i&amp;lt;=Nitems( RecipeStepIndex), i++,
			dtAggWide&amp;lt;&amp;lt;get column group( RecipeStepIndex[i] ))
		),
	X( :ChamberId ),
	//By(:),
	
	//All pairs Tukey HSD test
	All Pairs(
		1,
		Confidence Quantile( 0 ),
		Difference Matrix( 0 ),
		LSD Threshold Matrix( 0 ),
		Connecting Letters Report( 0 ),
		Ordered Differences Report( 1 )
	),
	//invisible, //use this to speed up.
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Mar 2022 01:55:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/jsl-how-to-plot-using-a-list-of-groups/m-p/470512#M71470</guid>
      <dc:creator>aliegner1</dc:creator>
      <dc:date>2022-03-17T01:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: jsl: how to plot using a list of groups?</title>
      <link>https://community.jmp.com/t5/Discussions/jsl-how-to-plot-using-a-list-of-groups/m-p/470534#M71474</link>
      <description>&lt;P&gt;so I ripped this solution from &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;:&amp;nbsp;&lt;A href="https://community.jmp.com/t5/Discussions/Script-multiple-columns-grouped-in-distribution-plot/td-p/162557" target="_blank"&gt;https://community.jmp.com/t5/Discussions/Script-multiple-columns-grouped-in-distribution-plot/td-p/162557&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but wondering if there's a way to just loop through the group names rather than doing this expression building thing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dtAggWide = current data table();
dtAggWide &amp;lt;&amp;lt; set name( "AggWide");

//get the column groups
colgroupNames = dt &amp;lt;&amp;lt; get column groups names;

//temporary string for testing
RecipeStepIndex ={"10.0.0.0.0.0", "11.0.0.0.0.0", "12.0.0.0.0.0"} 

// Build a character string that represents the commands that need to be run
theExpr_start = "ow1 = Oneway(
	Y( dtAggWide&amp;lt;&amp;lt;get column group( colgroupNames[1] )";
	
theExpr_end = "	),
	X( :ChamberId ),
	//By(:),
	
	//All pairs Tukey HSD test
	All Pairs(
		1,
		Confidence Quantile( 0 ),
		Difference Matrix( 0 ),
		LSD Threshold Matrix( 0 ),
		Connecting Letters Report( 0 ),
		Ordered Differences Report( 1 )
	),
	//invisible, //use this to speed up.
);";
	
//Loop across the remaining column groups in the colgroupNames list and generate the series of charts
For( i = 2, i &amp;lt;= N Items( colgroupNames ), i++,
	theExpr_start = theExpr_start || ", dtAggWide&amp;lt;&amp;lt;get column group( colgroupNames[" || Char( i ) || "] )"
);

//combine the strings
theExpr_final = theExpr_start || theExpr_end;

//Execute the code generated and placed into the character string variable
Eval( Parse( theExpr_final ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Mar 2022 02:18:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/jsl-how-to-plot-using-a-list-of-groups/m-p/470534#M71474</guid>
      <dc:creator>aliegner1</dc:creator>
      <dc:date>2022-03-17T02:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: jsl: how to plot using a list of groups?</title>
      <link>https://community.jmp.com/t5/Discussions/jsl-how-to-plot-using-a-list-of-groups/m-p/470538#M71475</link>
      <description>&lt;P&gt;Here is a rewrite of the code, removing the need for expression building&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();
dt&amp;lt;&amp;lt; set name( "AggWide" );

//get the column groups and put them into one long list
colgroupNames = dt &amp;lt;&amp;lt; get column groups names;
colsList = {};
For( i = 1, i &amp;lt;= N Items( colgroupNames ), i++,
	Insert Into( colsList, dt &amp;lt;&amp;lt; get column group( colgroupNames[i] ) )
);

//temporary string for testing
RecipeStepIndex = {"10.0.0.0.0.0", "11.0.0.0.0.0", "12.0.0.0.0.0"};

// Build a character string that represents the commands that need to be run
ow1 = Oneway(
	Y( Eval( colsList ) )
,
	X( :ChamberID ), 
	//By(:),
	
	//All pairs Tukey HSD test
	All Pairs(
		1,
		Confidence Quantile( 0 ),
		Difference Matrix( 0 ),
		LSD Threshold Matrix( 0 ),
		Connecting Letters Report( 0 ),
		Ordered Differences Report( 1 )
	), 
	//invisible, //use this to speed up.
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 05:36:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/jsl-how-to-plot-using-a-list-of-groups/m-p/470538#M71475</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-03-17T05:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: jsl: how to plot using a list of groups?</title>
      <link>https://community.jmp.com/t5/Discussions/jsl-how-to-plot-using-a-list-of-groups/m-p/470856#M71502</link>
      <description>&lt;P&gt;Thank you very much, none of my post reading had discovered the get function helping to draw that information out.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 15:31:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/jsl-how-to-plot-using-a-list-of-groups/m-p/470856#M71502</guid>
      <dc:creator>TDF</dc:creator>
      <dc:date>2022-03-17T15:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: jsl: how to plot using a list of groups?</title>
      <link>https://community.jmp.com/t5/Discussions/jsl-how-to-plot-using-a-list-of-groups/m-p/470857#M71503</link>
      <description>&lt;P&gt;Many thanks that solved the problem.&amp;nbsp; My post reading had not discovered the get function to draw out the information I required.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 15:33:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/jsl-how-to-plot-using-a-list-of-groups/m-p/470857#M71503</guid>
      <dc:creator>TDF</dc:creator>
      <dc:date>2022-03-17T15:33:20Z</dc:date>
    </item>
  </channel>
</rss>

