循環創建控製圖你好,
我有一個大型數據表,需要為其創建控製圖。 我需要為每一列創建一個新的控製圖,其中數據表中的第一列是示例標籤。
我搜索並找到了類似的帖子,我嘗試為我的目的重新創建這些帖子,但沒有任何運氣。 如果有人能告訴我我的代碼哪裡出了問題,那就太好了。
我對 jmp 腳本還很陌生,所以請隨時告訴我我是否也使用了馬虎的語法。
Current Data Table(dt5);
Rcols = dt5 << GetColumnNames(Numeric);
nw= New Window("Control Charts", myVLB = V List Box());
For(i=1, i<=nitems(Rcols), i++,
cc = Control Chart(
Sample Label( Column(dt5, Rcols[1] ) ),
KSigma( 3 ),
Chart Col( Column( Rcols[i] ) ),
Levey Jennings);
myVLB << Append(Report(cc));
);
回复:在循環中創建控製圖太棒了,這有效,謝謝!
回复:在循環中創建控製圖試試這個
Names Default To Here( 1 );
dt5 = Current Data Table();
Rcols = dt5 << GetColumnNames( Numeric );
nw = New Window( "Control Charts", myVLB = V List Box() );
For( i = 1, i <= N Items( Rcols ), i++,
cc = Control Chart(
Sample Label( Column( dt5, Rcols[1] ) ),
KSigma( 3 ),
Chart Col( Column( dt5, Rcols[i] ), Levey Jennings )
);
myVLB << Append( Report( cc ) );
cc << close window;
);