Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
Flavy
Level I

Gauge R&R Report into a data table

I need to create Gauge R&R studies for many systems, how to i export the results of the Gauge R&R report into a data table.

Can a create a script to extract the Repeatability, Reproducibility ... data into a table?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
txnelson
Super User

Re: Gauge R&R Report into a data table

Here is an example of what I think is pretty close to what you want

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Variability Data/wafer.jmp" );
// Add some new columns to allow for the sample data
// table to look somewhat like your table
For( i = 2, i <= 5, i++,
	dt << New Column( "Y" || Char( i ), formula( Random Uniform( 80, 120 ) ) )
);

colList = dt << get column names( string, continuous );

// Create a starter data table for placing all of the results in
dtFinal = New Table( "Final Results Table" );

// Loop across all of the columns and extract the required data 
For( i = 1, i <= N Items( colList ), i++,
	vc = dt << Variability Chart(
		invisible,
		Y( Eval( colList[i] ) ),
		X( :Operator, :Wafer ),
		Model( "Main Effect" ),
		Historical Sigma( 0 ),
		Name( "Gauge R&R" )(6, 0, 0, 0),
		Name( "Gauge R&R Report" )(1)
	);

	// Point at the report table you are interested in, and
	// pass the message to it to create the data table from it
	dtRR = Report( vc )["Gauge R&R"][Table Box( 1 )] << Make combined Data Table;

	dtFinal = dtFinal << concatenate( dtRR, append to first table( 1 ) );

	Close( dtRR, nosave );
);

// Make the transposed data table
dtReport = dtFinal << Split(
	Split By( :Measurement Source ),
	Split(
		:Name( "~AIAG abbrev" ),
		:Name( "Variation (6*StdDev)" ),
		:Name( "~AIAG Label" ),
		:Name( "which is 6*sqrt of" )
	),
	Group( :Y ),
	Sort by Column Property,
	Output Table("Guage R&R Report")
);

Also, the Scripting Guide is not a real good examples book, from the stand point of, "Here is how you do X".  It is a document targeted to teach the language.  So I suggest that you spend a bit more time with it and you will learn how to use it's components to generate your scripts.

Jim

View solution in original post

4 REPLIES 4
Highlighted
txnelson
Super User

Re: Gauge R&R Report into a data table

Here is an example of extracting the data table you requested.

Names default to here(1);
dt=open("$SAMPLE_DATA/Variability Data/wafer.jmp");
vc = dt << Variability Chart(
	Y( :Y ),
	X( :Operator, :Wafer ),
	Model( "Main Effect" ),
	Historical Sigma( 0 ),
	Name( "Gauge R&R" )(6, 0, 0, 0),
	Name( "Gauge R&R Report" )(1)
);

// Point at the report table you are interested in, and
// pass the message to it to create the data table from it
dtRR = report(vc)["Gauge R&R"][TableBox(1)] << Make into Data Table;

Documentation on working with the output Display Trees is in the Scripting Guide.

 

Jim
Highlighted
Flavy
Level I

Re: Gauge R&R Report into a data table

Thank you for the prompt response, 

 

Im trying to create a script to go through all columns in table 1 to generate GRR data and move them into a data table2 then generate graph XY Plot to mimic the customer graph below. 

 

Data Table 1

Flavy_0-1594909511606.png

Data Table2

Flavy_2-1594909595293.png

 

Final Graph

Flavy_3-1594909810804.png

 

Right now im going step by step , i can generate the GRR , the new data tame but im stuck on how to get values from the report into the GRR table..

 

Im a total noob trying to go through the scripting manual... but cant find a specific example... thanks

/////////////////////////////////////////////////////////////////////////

 

Variability Chart(
    Y( :CONT_VCC_mV ),
    X( :X_Y ),
    Model( "Main Effect" ),
    Historical Sigma( 0 ),
    Name( "Gauge R&R" )(6, 0, 0, 0),
    Name( "Gauge R&R Report" )(1),
    SendToReport( Dispatch( {}, "Gauge R&R", OutlineBox, {Set Title( "Gauge R&R" )} ) )
);

dt = New Table( "GRR_TABLE" );

dt << New Column( "TEST_NAME" );
dt << New Column( "Repeatability" );
dt << New Column( "Reproducibility" );
dt << New Column( "Guage R&R" );
dt << New Column( "Part Variation" );
dt << New Column( "Total Variation" );

dt << Add Rows( 1 );


// Get test name
x = Column( "TEST_NAME" );
x[1] = "CONT_VCC_mV"; // How to get this from Chart...

//Get Repeatability 
Y = Column( "Repeatability " );
x[2] = r[Outline Box( "Gauge R&R" ), Number Col Box( "Variation (6*StdDev)", 1 )] << get( 1 );

//Get Reproducibility
//Get Guage R&R
//Get Part Variation
//Get Total Variation
// XY, Plot results GRR_TABLE

 

Highlighted
txnelson
Super User

Re: Gauge R&R Report into a data table

Here is an example of what I think is pretty close to what you want

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Variability Data/wafer.jmp" );
// Add some new columns to allow for the sample data
// table to look somewhat like your table
For( i = 2, i <= 5, i++,
	dt << New Column( "Y" || Char( i ), formula( Random Uniform( 80, 120 ) ) )
);

colList = dt << get column names( string, continuous );

// Create a starter data table for placing all of the results in
dtFinal = New Table( "Final Results Table" );

// Loop across all of the columns and extract the required data 
For( i = 1, i <= N Items( colList ), i++,
	vc = dt << Variability Chart(
		invisible,
		Y( Eval( colList[i] ) ),
		X( :Operator, :Wafer ),
		Model( "Main Effect" ),
		Historical Sigma( 0 ),
		Name( "Gauge R&R" )(6, 0, 0, 0),
		Name( "Gauge R&R Report" )(1)
	);

	// Point at the report table you are interested in, and
	// pass the message to it to create the data table from it
	dtRR = Report( vc )["Gauge R&R"][Table Box( 1 )] << Make combined Data Table;

	dtFinal = dtFinal << concatenate( dtRR, append to first table( 1 ) );

	Close( dtRR, nosave );
);

// Make the transposed data table
dtReport = dtFinal << Split(
	Split By( :Measurement Source ),
	Split(
		:Name( "~AIAG abbrev" ),
		:Name( "Variation (6*StdDev)" ),
		:Name( "~AIAG Label" ),
		:Name( "which is 6*sqrt of" )
	),
	Group( :Y ),
	Sort by Column Property,
	Output Table("Guage R&R Report")
);

Also, the Scripting Guide is not a real good examples book, from the stand point of, "Here is how you do X".  It is a document targeted to teach the language.  So I suggest that you spend a bit more time with it and you will learn how to use it's components to generate your scripts.

Jim

View solution in original post

Highlighted
Flavy
Level I

Re: Gauge R&R Report into a data table

Thankyou so much! i ran in to the problem where
Report( variability chart[1] )["GaugeR&R"][Table Box( 1 )] << make combined data table would only save the first column , i see now how its supposed to be done