cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
ytwu
Level I

JMP Script question: How to use variables to control "show group means"?

Hi all:
I have a question about Variability chart.

I am trying to use a variable "aaa" to control if the a certain variability chart need group means.
Below is the simplified code:
According to the log file, it seems that jmp does not substitute aaa to 0 so that it still plot group means even if
aaa=0.
Is there any way to let jmp to realize aaa is a variable?
Note: The values of aaa could be 0, 1 or "Split1"
Thanks


Code:

aaa = 0;
Variability Chart(
	Y(:Name("DIMPLE LG (NM)")), 
	X(:LOT, :DIMPLE LG), 
	Show Group Means(aaa)
);
1 REPLY 1
jthi
Super User

Re: JMP Script question: How to use variables to control "show group means"?

Eval(EvalExpr()) usually works in situations like this

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Variability Data/2 Factors Crossed.jmp");

show_means = 0;

Eval(EvalExpr(
	varchart = dt << Variability Chart(
		Y(:Measurement), 
		X(:Operator, :part#),
		Show Group Means(Expr(show_means))
	);	
));
-Jarmo

Recommended Articles