<?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: GR&amp;amp;R calculation in script in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/GR-amp-R-calculation-in-script/m-p/578102#M78564</link>
    <description>&lt;P&gt;Here is a simple example that pulls a vector of data from the R&amp;amp;R report, and then places it into a new report.&amp;nbsp; You should be able to go from here to just getting the data you need, and passing it on to the next steps in your script.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1670346874037.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47970i5C958A5CB0DF9C49/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1670346874037.png" alt="txnelson_0-1670346874037.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt = open("$SAMPLE_DATA/Variability Data/Gasket.jmp");

Variability Chart(invisible,
	Y( :Y ),
	X( :Operator, :Part ),
	Model( "Crossed" ),
	Historical Sigma( 0 ),
	Analysis Type( "Choose best analysis (EMS REML)" ),
	Connect Cell Means( 1 ),
	Show Grand Mean( 1 ),
	XBar Control Limits( 1 ),
	S Control Limits( 1 ),
	Mean of Std Dev( 1 ),
	Gauge RR( 6, 0, 0, 0 ),
	Gauge RR Report( 1 )
);
rp = Current Report();
// Get the Variation data from the Output Display
VariationText = rp["Gauge R&amp;amp;R"][StringColBox(1)] &amp;lt;&amp;lt; get;
Variation = rp["Gauge R&amp;amp;R"][NumberColBox(2)] &amp;lt;&amp;lt; get;
// Get the Summary and Gauge R&amp;amp;R Statistics
Stats = rp["Gauge R&amp;amp;R"][NumberColBox(5)] &amp;lt;&amp;lt; get;
StatsText = rp["Gauge R&amp;amp;R"][StringColBox(5)] &amp;lt;&amp;lt; get;

// Build a new report
NW = New Window("my report",
	table box(
		string col box("Meas Source", variationText),
		number col box("Variation", variation)
	),
	spacer box(0,20),
	table box(
		number col box("", stats), string col box("", statsText)
	)
);

rp &amp;lt;&amp;lt; close window;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_1-1670346944453.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47971iD625AC3A755D07C0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_1-1670346944453.png" alt="txnelson_1-1670346944453.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The reading and manipulating of Display objects is documented in the Scripting Guide in the JMP Documentation Library, available under the Help pull down menu.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Dec 2022 17:23:49 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2022-12-06T17:23:49Z</dc:date>
    <item>
      <title>GR&amp;R calculation in script</title>
      <link>https://community.jmp.com/t5/Discussions/GR-amp-R-calculation-in-script/m-p/578022#M78559</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have several test parameters for which I need their GR&amp;amp;R results calculated by JMP and stored in a variable, using the JMP script. Specifically, I need the values reported on the GR&amp;amp;R analysis (shown below) as variables in a script. I assume that there is a function that by calling it in a script I can get these results (or some of them) as the return value of that function. I tried saving the Variability Gauge window as a script, but the contents do not seem helpful (copied below). Can someone show me how to use scripts to store the GR&amp;amp;R results in a variable and print it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LoglinearRange8_0-1670341617316.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47966i0F5CAA69F8D0CD22/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LoglinearRange8_0-1670341617316.png" alt="LoglinearRange8_0-1670341617316.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Variability Chart(
	Y( :"Check DUT Tx Output Power &amp;gt; Limit"n ),
	MSA Metadata(
		:"Check DUT Tx Output Power &amp;gt; Limit"n(
			Lower Tolerance( -10 ),
			Upper Tolerance( 8 ),
			Tolerance Range( 18 )
		)
	),
	Model( "Crossed" ),
	X( :Operator, :UUT ),
	Variability Analysis(
		:"Check DUT Tx Output Power &amp;gt; Limit"n,
		"Gauge R&amp;amp;R Report"n( 1 )
	),
	SendToReport(
		Dispatch(
			{"Variability Gauge Analysis for Check DUT Tx Output Power &amp;gt; Limit"},
			"Variability Chart for Check DUT Tx Output Power &amp;gt; Limit",
			OutlineBox,
			{Close( 1 )}
		),
		Dispatch(
			{"Variability Gauge Analysis for Check DUT Tx Output Power &amp;gt; Limit",
			"Gauge R&amp;amp;R"},
			"Variance Components for Gauge R&amp;amp;R",
			OutlineBox,
			{Close( 1 )}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Jun 2023 00:58:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/GR-amp-R-calculation-in-script/m-p/578022#M78559</guid>
      <dc:creator>LoglinearRange8</dc:creator>
      <dc:date>2023-06-09T00:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: GR&amp;R calculation in script</title>
      <link>https://community.jmp.com/t5/Discussions/GR-amp-R-calculation-in-script/m-p/578102#M78564</link>
      <description>&lt;P&gt;Here is a simple example that pulls a vector of data from the R&amp;amp;R report, and then places it into a new report.&amp;nbsp; You should be able to go from here to just getting the data you need, and passing it on to the next steps in your script.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1670346874037.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47970i5C958A5CB0DF9C49/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1670346874037.png" alt="txnelson_0-1670346874037.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt = open("$SAMPLE_DATA/Variability Data/Gasket.jmp");

Variability Chart(invisible,
	Y( :Y ),
	X( :Operator, :Part ),
	Model( "Crossed" ),
	Historical Sigma( 0 ),
	Analysis Type( "Choose best analysis (EMS REML)" ),
	Connect Cell Means( 1 ),
	Show Grand Mean( 1 ),
	XBar Control Limits( 1 ),
	S Control Limits( 1 ),
	Mean of Std Dev( 1 ),
	Gauge RR( 6, 0, 0, 0 ),
	Gauge RR Report( 1 )
);
rp = Current Report();
// Get the Variation data from the Output Display
VariationText = rp["Gauge R&amp;amp;R"][StringColBox(1)] &amp;lt;&amp;lt; get;
Variation = rp["Gauge R&amp;amp;R"][NumberColBox(2)] &amp;lt;&amp;lt; get;
// Get the Summary and Gauge R&amp;amp;R Statistics
Stats = rp["Gauge R&amp;amp;R"][NumberColBox(5)] &amp;lt;&amp;lt; get;
StatsText = rp["Gauge R&amp;amp;R"][StringColBox(5)] &amp;lt;&amp;lt; get;

// Build a new report
NW = New Window("my report",
	table box(
		string col box("Meas Source", variationText),
		number col box("Variation", variation)
	),
	spacer box(0,20),
	table box(
		number col box("", stats), string col box("", statsText)
	)
);

rp &amp;lt;&amp;lt; close window;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_1-1670346944453.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47971iD625AC3A755D07C0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_1-1670346944453.png" alt="txnelson_1-1670346944453.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The reading and manipulating of Display objects is documented in the Scripting Guide in the JMP Documentation Library, available under the Help pull down menu.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 17:23:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/GR-amp-R-calculation-in-script/m-p/578102#M78564</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-12-06T17:23:49Z</dc:date>
    </item>
  </channel>
</rss>

