こんにちは、みんな、
サブセット ボタン機能を使用して、管理図のデータ テーブル サブグループを作成しようとしています。 インタラクティブ グラフからサブセットを作成する?という同様のリンクを見つけましたが、これは行用です。 代わりに列を使用したいと思います。 複数の列があり、管理図で列スイッチャーを使用しています。 管理図で特定のデータ ポイントを選択し、その特定の列のポイントのデータのみを取得できるようにしたいと思います。
以下は私が使用しようとしたJSLであり、列に変更しようとして失敗しました。
dt5= Data Table( "SPC Columns" );
colNamesList = dt5 << get Column names (string, Continuous);
gb= dt5 << Control Chart Builder(
Size( 534, 464 ),
Show Control Panel( 0 ),
Variables( Y( eval(colNamesList[1]) ) ),
Chart(
Position( 1 ),
Limits( Shade Zones( 1 ) ),
Warnings(
Test 1( 1 ),
Test 2( 1 ),
Test 3( 1 ),
Test 4( 1 ),
Test 5( 1 ),
Test 6( 1 ),
Test 7( 1 ),
Test 8( 1 )
)),
Column Switcher(colNamesList[1], Eval( colNamesList ))
);
subsetButton = Button Box( "Click to Create a Subset of Selected Points",
If( N Rows( dt5 << get selected rows ) > 0,
dt5 << subset( selected rows( 1 ), selected columns( 0 ) )
)
);
Report( gb )["Graph Builder"] << append( subsetButton );
これにより、特定のデータ ポイントを選択するときに、単一列のデータが必要な行にデータが含まれるすべての列が得られます。
助けてくれてありがとう、
-ライアン
ほとんどの作業は完了しました。 それを終わらせる1つの方法は次のとおりです。
NamesDefaultToHere(1);
// Data table with some continuous columns
dt = Open("$SAMPLE_DATA/Big Class.jmp" );
colNamesList = dt << get Column names (string, Continuous);
// Control chart
gb = dt << Control Chart Builder(Show Control Panel( 0 ), Variables( Y( eval(colNamesList[1]) ) ));
// Add a column switcher
cs = gb << Column Switcher(colNamesList[1], Eval( colNamesList ));
// 'Extra' button with subset action
subsetButton = Button Box("Click to Create a Subset of Selected Points",
If( N Rows( dt << get selected rows ) > 0,
currentCol = cs << getCurrent;
dt2 = dt << subset( selected rows( 1 ), Columns(Eval(Column(dt, currentCol))));
dt2 << setName("Subset of "||(dt << getName)||" using "||currentCol);
,
Beep();
);
);
// Add this button to the control chart report (use 'topParent' so that this is not affected by any column switcher changes)
(Report(gb)[OutlineBox("Control Chart Builder")] << topParent) << append(subsetButton);