這段程式碼之所以能運行,是因為我在 Where(...) 子句中明確地寫入了 ":WaferID":
= 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 )} ) ) ))
);// Example Parameters<BR />colParaList = {Column(dt, "Para1"), Column(dt, "Para2"), Column(dt, "Para3")};
splitPara = Column(dt, "Site");
byPara = Column(dt, "WaferID");<BR /><CODE class="language-jsl"><BR />byParaValues
這段程式碼不起作用,因為我使用的是 Eval(byPara)。
// Example Parameters<BR />colParaList = {Column(dt, "Para1"), Column(dt, "Para2"), Column(dt, "Para3")};
splitPara = Column(dt, "Site");
byPara = Column(dt, "WaferID");
byParaValues = Associative Array(byPara) << GetKeys();<BR />New Window("Test", vlb = V List Box(<BR /> dt << Fit Group(<BR /> For(iC = 1, iC <= NItems(colParaList), iC++, <BR /> Oneway(Y(Eval(colParaList[iC])), X(splitPara)) ), <BR /> << {Arrange in Rows(1)}, <BR /> Where(Eval(byPara) == "001"), <BR /> SendToReport( Dispatch( {}, "Fit Group" || Char(Eval(byPara) << GetName()) || "=" || Char(byParaValues[1]), OutlineBox, {Close( 1 )} ) ) )<BR /> )<BR />);
為什麼其中一個有效,而另一個無效?根據我的經驗,如果我將“Eval(byPara)”替換為“byPara”,它也無法正常工作。
我的目標是編寫出與第二個版本類似的程式碼,因為腳本無法預知「byPara」的值,所以它應該是通用的。有什麼方法可以實現這一點嗎?
你想做什麼?是對幾列資料進行單因子變異數分析,將分析結果匯總到「擬合組」中,然後應用「範圍」指令將資料限製到單一組中,最後關閉一個大綱框嗎?另外,你使用的是哪個版本的 JMP?
我嘗試對多個 Y 參數和多個 By 參數進行單因子變異數分析,但我希望建立的擬合組首先按 Y 參數分組,然後再按 By 參數分組。因此,Y 參數和 By 參數的名稱都需要寫入變數。
我使用的是 JMP 19。
謝謝。
你最終想要的佈局是什麼樣的?你試過把資料堆疊起來,然後執行「擬合 Y 軸 X 軸」函數嗎?