cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
yanee
Level III

GRR Report

Hi,

 

I have script to generate GRR plot and then make a summary table.  The problem is when I have a mix of one side and two side spec and use command "make combined data table", it will show only either one side spec or two side spec based on the first parameter.

 

How can I get the summary table of both in the script ?

 

 

 

new window ("GRR",
for (i = 1, i <= N items (ColList), i++,
	 
	variability chart (
		Y ((ColList [i])),
		X (:Operators, :Parts),
		Model ("Crossed"),
		Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
		Show group means (1),
		Points Jittered( 1 ),
		AIAG Labels( 0 ),
		Show Box Plots( 1 ),
		Mean Diamonds( 1 ),
		Mean Plots( 1 ),
		Historical Sigma(0),
		Name( "Gauge R&R" )(5.15),
		Name( "Gauge R&R Report" )(1),
		Automatic Recalc( 1 ),
		)
);
);


temp = report (variability chart[1])["GaugeR&R"][table box(1)] << make combined data table; 


temp = report (variability chart[1])["GaugeR&R"][table box(1)] << make combined data table; 
temp << set name("GR&R summary");

data table ("GR&R summary") << select where (:Measurement Source != "Gauge R&R");
data table ("GR&R summary") << delete rows;

 

7 REPLIES 7
txnelson
Super User

Re: GRR Report

I would output the table in question after each Variability chart, and then concatenate it to a master table, and then go on to the next Variability Chart.  Something like:

dtOut = New Data Table( "Guage R&R Summary" );

New Window( "GRR",
	For( i = 1, i <= N Items( ColList ), i++, 
	 
		variability chart(
			Y( (ColList[i]) ),
			X( :Operators, :Parts ),
			Model( "Crossed" ),
			Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
			Show group means( 1 ),
			Points Jittered( 1 ),
			AIAG Labels( 0 ),
			Show Box Plots( 1 ),
			Mean Diamonds( 1 ),
			Mean Plots( 1 ),
			Historical Sigma( 0 ),
			Name( "Gauge R&R" )(5.15),
			Name( "Gauge R&R Report" )(1),
			Automatic Recalc( 1 ),

		);
		temp = Report( variability chart[1] )["GaugeR&R"][Table Box( 1 )] << make combined data table;
		dtOut << concatenate( temp, append to first table( 1 ) );
		Close( temp, nosave );
	)
);

data table ("GR&R summary") << select where (:Measurement Source != "Gauge R&R");
data table ("GR&R summary") << delete rows;
Jim
yanee
Level III

Re: GRR Report

i tried your script. The for loop doesn't work. it report only the first parameter.

txnelson
Super User

Re: GRR Report

I have reworked the code, and tested it against a data table I had available, and it appears to work.  See if it works for you

Names Default To Here( 1 );
dt = Current Data Table();
dtOut = New Table( "Guage R&R Summary" );
colList = dt << get column names( continuous, string );
New Window( "GRR",
	For( i = 1, i <= N Items( ColList ), i++,
		theChart = dt << variability chart(
			Y( (ColList[i]) ),
			X( :Operators, :Parts ),
			Model( "Crossed" ),
			Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
			Show group means( 1 ),
			Points Jittered( 1 ),
			AIAG Labels( 0 ),
			Show Box Plots( 1 ),
			Mean Diamonds( 1 ),
			Mean Plots( 1 ),
			Historical Sigma( 0 ),
			Name( "Gauge R&R" )(5.15, 0, 0, 0),
			Name( "Gauge R&R Report" )(1),
			Automatic Recalc( 1 ), 

		);
		temp = Report( theChart )["GaugeR&R"][Table Box( 1 )] << make combined data table;
		dtOut << concatenate( temp, append to first table( 1 ) );
		Close( temp, nosave );
	)
);
Jim
yanee
Level III

Re: GRR Report

Hi,

 

The GRR plot is correct however no data in the GR&R summary. Anyway, this afternoon I try a different way. I split the plot into 2 tab. first tab for one side spec and another for two side spec. Now it seems working.

 

 

my next problem is I want to save plots into .ppt. I want one variable chart per page. 

When I try to use save presentation to .ppt. It show one small graph (inside the variable chart) per page. Is there a way to combine them?

 

data table("split_spec") << select where (:spec type == "one side") ;
rows = data table("split_spec")<< get selected rows;
ColList1 = :Label[rows];
 
data table("split_spec") << select where (:spec type == "two side") ;
rows = data table("split_spec")<< get selected rows;
ColList2 = :Label[rows];
 
	


dtOut = New Table( "GRR_Summary");

current data table(dt_raw);

nw = new window ("GRR",tb = tab box(),vlb = vlist box());
tb << add ("OneSideSpec", vlb = v list box());

 for (i = 1, i <= N items (ColList1), i++,
	vlb << append(
	v1 = variability chart (
		Y ((ColList1 [i])),
		X (:Operators, :Parts),
		Model ("Crossed"),
		Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
		Show group means (1),
		Points Jittered( 1 ),
		AIAG Labels( 0 ),
		Show Box Plots( 1 ),
		Mean Diamonds( 1 ),
		Mean Plots( 1 ),
		Historical Sigma(0),
		Name( "Gauge R&R" )(5.15),
		Name( "Gauge R&R Report" )(1),
		Automatic Recalc( 1 ),
		);
		
		);


);
 
temp = report (v1)["GaugeR&R"][table box(1)] << make combined data table; 
dtOut << concatenate( temp, append to first table( 1 ) );
close(temp, nosave);

tb << Add( "TwoSideSpec", vlb2 = V List Box() ) ;
current data table(dt_raw);
 For( i = 1, i <= N Items( ColList2 ), i++,
	vlb2 << append(
		v2 = variability chart(
			Y( (ColList2[i]) ),
			X( :Operators, :Parts ),
			Model( "Crossed" ),
			Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
			Show group means( 1 ),
			Points Jittered( 1 ),
			AIAG Labels( 0 ),
			Show Box Plots( 1 ),
			Mean Diamonds( 1 ),
			Mean Plots( 1 ),
			Historical Sigma( 0 ),
			Name( "Gauge R&R" )(5.15),
			Name( "Gauge R&R Report" )(1),
			Automatic Recalc( 1 ),
		);
		
	
	);
	

);

temp = report(v2)["GaugeR&R"][table box(1)] << make combined data table; 
dtOut << concatenate( temp, append to first table( 1 ) );
close(temp, nosave);

data table ("GRR_Summary") << select where (:Measurement Source != "Gauge R&R");
data table ("GRR_Summary") << delete rows;
txnelson
Super User

Re: GRR Report

The method that I use to do this, is to create a display object, with the graphs I want to be on the ppt slide, and then create a picture object from the display object, and place that into a journal.  The Save the Presentation from the journal entry;

Jim
yanee
Level III

Re: GRR Report

Can you show me an example of create the display object ?
txnelson
Super User

Re: GRR Report

What I mean by a Display Object is any of the objects that can be placed into a New Window(), and will display.  You can use those object without being in a New Window, and you can place output into those objects, and they will not be displayed, until appended into a New Window.  Below is a very simple example of using a <<get picture, to create the pptx slide the way you want it to be.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );

vlb = V List Box(
	Graph Builder(
		Size( 1000, 1000 ),
		Show Control Panel( 0 ),
		Variables( X( :weight ), Y( :height ) ),
		Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) )
	),
	Graph Builder(
		Size( 1000, 1000 ),
		Show Control Panel( 0 ),
		Variables( X( :age ), Y( :height ) ),
		Elements( Box Plot( X, Y, Legend( 9 ) ) )
	)
);

nw = New Window( "pptslide", <<journal, ob = Outline Box( "This will be the ppt Slides Title" ) );

ob << append( vlb << get picture );

nw << save presentation( "$TEMP\pictureexample.pptx" );
nw << close window;

Open( "$TEMP\pictureexample.pptx" );
Jim