cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
] />

Discussions

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

Using Where() in Oneway Graph for multiple parameters

This code works because I am explicitly writing ":WaferID" inside of the Where(...) clause:

// Example Parameters
colParaList = {Column(dt, "Para1"), Column(dt, "Para2"), Column(dt, "Para3")}; splitPara = Column(dt, "Site"); byPara = Column(dt, "WaferID");

byParaValues
= Associative Array(byPara) << GetKeys();
New Window("Test", vlb = V List Box(
dt << Fit Group(
For(iC = 1, iC <= NItems(colParaList), iC++,
Oneway(Y(Eval(colParaList[iC])), X(splitPara)) ),
<< {Arrange in Rows(1)},
Where(:WaferID == "001"),
SendToReport( Dispatch( {}, "Fit Group WaferID=001", OutlineBox, {Close( 1 )} ) ) ))
);

This code doesn't work because I am instead using Eval(byPara).

// Example Parameters
colParaList = {Column(dt, "Para1"), Column(dt, "Para2"), Column(dt, "Para3")}; splitPara = Column(dt, "Site"); byPara = Column(dt, "WaferID"); byParaValues = Associative Array(byPara) << GetKeys();
New Window("Test", vlb = V List Box(
dt << Fit Group(
For(iC = 1, iC <= NItems(colParaList), iC++,
Oneway(Y(Eval(colParaList[iC])), X(splitPara)) ),
<< {Arrange in Rows(1)},
Where(Eval(byPara) == "001"),
SendToReport( Dispatch( {}, "Fit Group" || Char(Eval(byPara) << GetName()) || "=" || Char(byParaValues[1]), OutlineBox, {Close( 1 )} ) ) )
)
);

Why does one of the two work, but the other doesn*t? In my expierience it also doesn't work if I replace "Eval(byPara)" by "byPara".

My goal is to write it similarly to the second version because the script cannot assume what the 'byPara' is going to be, so it should be general. Is there a way to achieve something like this?

3 REPLIES 3
jthi
Super User

Re: Using Where() in Oneway Graph for multiple parameters

What are you trying to do? Run Oneway analysis over few different columns, collect those analyses to Fit Group, apply Where to limit data into single group and close one outline box? Also, which JMP version are you using?

-Jarmo
nozellot
Level II

Re: Using Where() in Oneway Graph for multiple parameters

I am trying to run Oneway analysis over multiple Y-parameters and multiple By-parameters, however I want the created FitGroups to be first grouped by the Y parameter and then by the By parameters. Thus both the Y and By parameternames need to be written into variables.

I am using JMP 19.

Thanks already.

jthi
Super User

Re: Using Where() in Oneway Graph for multiple parameters

What is the final layout you wish to have? Have you tried stacking your data and then running Fit Y by X?

-Jarmo

Recommended Articles