プロセス能力機能のループユーザーが選択した一連の列名(col_name)をループ処理しようとしています。
それからそれらのリストから、コードはそれぞれの個々の列に対して実行されます。
問題は、JMPがcol_name [i]を列として読み取るようにすることができないことです。文字列として読み取るだけです。
列がデータテーブルに見つからないことを示します。
/*****************************************************
*********************** Cpk *********************
*****************************************************/
cpk =expr(
for (k=1,k<=n items(col_name),k++
Process Capability(
Process Variables( col_name[i]) ),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{choice[i] << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config == config[k] )
))
);プロセス能力関数をループするこんにちは、添付されている生データの簡略版です
プロセス能力関数をループする問題のデバッグに役立つサンプルデータをいくつか提供してください。
プロセス能力関数をループする動作していないようです、私は代用の設定を印刷してみました、それが表示されます
しかし、出力の名前はまだ変更されています
CPK = Expr(
v list box(
For( i = 1, i <= N Items( choices ), i++,
For( j = 1, j <= N Items( Config ), j++,
;
Eval(
Substitute(
Expr(
Process Capability(
Process Variables( As Column( choices[i] ) ),
Spec Limits(
__choices__(
LSL( FAI_SPECS[choices[i] || " LSL"] ),
Target( FAI_SPECS[choices[i] || " Nominal"] ),
USL( FAI_SPECS[choices[i] || " USL"] )
)
),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{__choices__ << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config == config[j] );//"P1_41_PBO")///":name(\!"" || Config[j] || "\!")")
SendToReport(
Dispatch(
{},
"Individual Detail Reports",
OutlineBox,
{Set Title( __YourConfig__ )}
)
);
);
print(__YourConfig__);
),
Expr( __choices__ ), Parse( ":name(\!"" || choices[i] || "\!")" ),
Expr( __YourConfig__ ), Char( Config[j] )
)
)
;
)
)
)
);プロセス能力関数をループするこれはSubstitute()関数を単純に展開したもので、必要な結果が得られます。
CPK = Expr(
For( i = 1, i <= N Items( choices ), i++,
For( j = 1, j <= N Items( Config ), j++,
Print( choices );
Eval(
Substitute(
Expr(
Process Capability(
Process Variables( As Column( choices[i] ) ),
Spec Limits(
__choices__(
LSL( FAI_SPECS[choices[i] || " LSL"] ),
Target( FAI_SPECS[choices[i] || " Nominal"] ),
USL( FAI_SPECS[choices[i] || " USL"] )
)
),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{__choices__ << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config == config[j] );//"P1_41_PBO")///":name(\!"" || Config[j] || "\!")")
SendToReport(
Dispatch(
{},
"Individual Detail Reports",
OutlineBox,
{Set Title( __YourConfig__ )}
)
);
)
),
Expr( __choices__ ), Parse( ":name(\!"" || choices[i] || "\!")" ),
Expr( __YourConfig__ ), Char( Config[j] )
)
)
;
)
)
);プロセス能力関数をループするどうも、
このjslスクリプトで私を助けてくれてあなたの辛抱してくれてありがとう
あなたなしではできなかったでしょう。
このスクリプトのもう1つの調整
タイトルを設定する方法
CPK = Expr(
For( i = 1, i <= n items(choices), i++,
for(j=1,j<=n items(Config),j++,
print(choices);
Eval(
Substitute(
Expr(
Process Capability(
Process Variables(as column(choices[i])) ,
Spec Limits( __choices__( LSL(FAI_SPECS[choices[i] || " LSL"] ), Target( FAI_SPECS[choices[i] || " Nominal"] ), USL( FAI_SPECS[choices[i] || " USL"] ) ) ),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{ __choices__ << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config ==config[j]);//"P1_41_PBO")///":name(\!"" || Config[j] || "\!")")
SendToReport(
Dispatch(
{},
"Individual Detail Reports",
OutlineBox,
{Set Title( "To the same as config[j]" )}
)
)
)
),
Expr( __choices__ ), Parse( ":name(\!"" || choices[i] || "\!")" )
)
)
)
)
);プロセス能力関数をループするあなたが持っている複雑なカラム名で、JMPはそれを正しく解析するのに助けが必要です。 :Name()関数は、名前を名前として表示するために使用する必要があり、実行する必要があるものではありません。
CPK = Expr(
For( i = 1, i <= N Items( choices ), i++,
Print( choices );
Eval(
Substitute(
Expr(
Process Capability(
Process Variables( As Column( choices[i] ) ),
Spec Limits( __choices__( LSL( 400 ), Target( 425 ), USL( 450 ) ) ),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{__choices__ << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config=="P1_A1_MBO" )
);
Print( "choice: _", __choices__, "_chhoice" );
),
Expr( __choices__ ), Parse( ":name(\!"" || choices[1] || "\!")" )
)
);
)
);
dt=current data table();
choices = { "FAI 37_SPC AK R14 Thickness R14 top - Cu Surface","Filling VIM Total Thickness" };
new window("jo",V list box(cpk));プロセス能力関数をループするコードは例のデータテーブルで動作しましたが、私が自分のデータで試したところ、このエラーが発生しました。
添付されているのは、データイムがプルしようとしていることを示す
CPK = Expr(
For( i = 1, i <= N Items( choices ), i++,
Print( choices );
Eval(
Substitute(
Expr(
Process Capability(
Process Variables( As Column( choices[i] ) ),
Spec Limits( __choices__( LSL( 400 ), Target( 425 ), USL( 450 ) ) ),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{__choices__ << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config==P1_A1_MBO )
);
Print( "choice: _", __choices__, "_chhoice" );
),
Expr( __choices__ ), Parse( ":" || choices[1] )
)
);
)
);
dt=current data table();
choices = { "FAI 37_SPC AK R14 Thickness R14 top - Cu Surface","Filling VIM Total Thickness" };
new window("jo",V list box(cpk));{「FAI 37_SPC AK R14の厚さR14上 - 銅の表面」、「満ちるVIM総厚さ」}
名前未解決:アクセス中の構成{1}または '構成'の評価、:構成/ * ### * /
データテーブル 'FAI_Spec 2'に対するこのWhere句の結果、行は発生しませんでした。:Config == P1_A1_MBO
"選択: _"
名前未解決:FAI 37_SPC AK R14の厚さR 14のトップ{1}へのアクセスまたは「FAI 37_SPC AK R14の厚さR14トップ」の評価:、FAI 37_SPC AK R14の厚さR14トップ/ * ### * /
プロセス能力関数をループするここにあなたが提供したコードと一緒に簡略化されたデータテーブルがあります、そして私のシステムでは、それはあなたのPrintステートメントを含めてエラーなしで実行されます。
dt = New Table( "Example",
Add Rows( 40 ),
New Column("config",
Character( 1 ),
Set Values(
{"P1_31_PBO", "P1_31_PBO", "P1_31_PBO", "P1_31_PBO", "P1_31_PBO", "M", "M", "M", "P1_31_PBO", "P1_31_PBO", "P1_31_PBO", "M", "M", "M",
"M", "P1_31_PBO", "P1_31_PBO", "P1_31_PBO", "P1_31_PBO", "P1_31_PBO", "M", "M", "M", "M", "M", "M", "M", "P1_31_PBO",
"P1_31_PBO", "M", "M", "M", "M", "M", "P1_31_PBO", "P1_31_PBO", "M", "P1_31_PBO", "M", "M"}
)
),
New Column("height",
Set Values(
[59, 61, 55, 66, 52, 60, 61, 51, 60, 61, 56, 65, 63, 58, 59, 61, 62, 65,
63, 62, 63, 64, 65, 64, 68, 64, 69, 62, 64, 67, 65, 66, 62, 66, 65, 60,
68, 62, 68, 70]
)
)
);
CPK = Expr(
For( i = 1, i <= N Items( choices ), i++,
Print( choices );
Eval(
Substitute(
Expr(
Process Capability(
Process Variables( As Column( choices[i] ) ),
Spec Limits( __choices__( LSL( 400 ), Target( 425 ), USL( 450 ) ) ),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{__choices__ << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config == "P1_31_PBO" )
);
Print( "choice: _", __choices__, "_chhoice" );
),
Expr( __choices__ ), Parse( ":" || choices[1] )
)
);
)
);
dt=current data table();
choices = { "height" };
cpk;プロセス能力関数をループする CPK = Expr(
For( i = 1, i <= n items(choices), i++,
print(choices);
Eval(
Substitute(
Expr(
Process Capability(
Process Variables(as column(choices[i]) ),
Spec Limits( __choices__( LSL( 400 ), Target( 425 ), USL( 450 ) ) ),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{ __choices__ << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config == "P1_31_PBO" )
);
print("choice: _",__choices__,"_chhoice")
),
Expr( __choices__ ), Parse(":" || choices[1] )
)
)
)
);私はそれが与えるものを見るためにprintを使ってみました、しかし、私は「未知の」エラーを得続けます
プロセス能力関数をループするJimの勧告に加えて、この場合は、デバッガを使用して行を進むときやブレークポイントで変数を調べたり監視したりするのに適した時期です。
プロセス能力関数をループする"i"の値をステップスルーして、"i"の値ごとにSubstitution()関数からどのコードが生成されているかを確認することをお勧めします。それでは、なぜコードが "i"の特定の値に対して機能しないのかを見るべきです。
プロセス能力関数をループする///BOX PLOT///
boxplot=expr(
data_filtering;
choices=choice<<GETKEYS></GETKEYS><BR />
//BOX PLOT inner expression//
box_plot_inner_expr=expr(
for(i=1,i<=n items(choices),i++,
FAI_USL=Fai_specs[concat(choices[i]," USL")];
FAI_LSL=Fai_specs[concat(choices[i]," LSL")];
FAI_target=Fai_specs[concat(choices[i]," Nominal")];
print(FAI_USL);
Oneway(
Y(choices[i]),
X( :Config),
All Pairs(
1,
Confidence Quantile( 0 ),
LSD Threshold Matrix( 0 ),
Connecting Letters Report( 0 ),
Ordered Differences Report( 0 )
),
Comparison Circles( 0 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
Connect Means( 1 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
OutlineBox,
{
}
),
Dispatch(
{},
"1",
ScaleBox,
{Min( FAI_LSL-10 ), Max(FAI_USL+10 ), Inc( 5 ), Minor Ticks( 1 ),
Add Ref Line( FAI_LSL, "Dashed", "Medium Dark Red", "LSL", 1 ),
Add Ref Line( FAI_USL, "Dashed", "Medium Dark Red", "USL", 1 ),
Add Ref Line( FAI_target, "Dashed", "Dark Green", "Target", 1 )}
),
Dispatch(
{},
"Oneway Plot",
FrameBox,
{Frame Size( 347, 229 ), DispatchSeg(
Box Plot Seg( 1 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 2 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 3 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 4 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 5 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 6 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 7 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 8 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 9 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 10 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 11 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 12 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 13 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 14 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 15 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 16 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 17 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 18 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 19 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
)}
),
Dispatch( {}, "Means and Std Deviations", OutlineBox, {Close( 1 )} ),
Dispatch( {}, "Means Comparisons", OutlineBox, {Close( 1 )} )
)
)));
プロセス能力関数をループするCPK式を呼び出しているコードはどのようなものですか?プロセス能力関数をループするあなたの忍耐のおかげで、しかしn個のアイテムに変更を加えた後でも、それは選択肢の中の一つのアイテムのスペックとヒストグラムだけをしました
もう一人のJMPはまだ手動キー入力を私に要求しました
CPK = Expr(
For( i = 1,i<=n items(choices) , i++,
Eval(
Substitute(
Expr(
Process Capability(
Process Variables( as column(choices[i])),
Spec Limits( __choices__( LSL( 400 ), Target( 425 ), USL( 450 ) ) ),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{ __choices__ << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config == "P1_31_PBO" )
)
),
Expr( __choices__ ), Parse( ":" || choices[i] )
)
)
)
);プロセス能力関数をループするコードをテストしていたときにFor()ループの定義を変更し、元に戻すのを忘れていました......これはおそらく問題です..... For()ループをに置き換えてください
CPK=expr(for(i=1,i<=n items(choices),i++,
プロセス能力関数をループする少しツイートした
しかし、スペックと隠れたヒストグラムはリストの2番目の項目でしか機能しません。
CPK = Expr(
For( i = 1, i <= 2, i++,
Eval(
Substitute(
Expr(
Process Capability(
Process Variables( as column(choices[i])),
Spec Limits( __choices__( LSL( 400 ), Target( 425 ), USL( 450 ) ) ),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{ __choices__ << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config == "P1_31_PBO" )
)
),
Expr( __choices__ ), Parse( ":" || choices[i] )
)
)
)
);プロセス能力関数をループするJSLのステートメントの中には、実行前にステートメント内の項目を評価する機能がないものがあります。 その場合は、Substitutionを使用して実行前に完全なステートメントを作成するのが最善の方法です。 以下は、スクリプトを代替方法に変更したものです。
CPK = Expr(
For( i = 1, i <= 1, i++,
Eval(
Substitute(
Expr(
Process Capability(
Process Variables( __choices__ ),
Spec Limits( __choices__( LSL( 400 ), Target( 425 ), USL( 450 ) ) ),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{ __choices__ << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config == "P1_31_PBO" )
)
),
Expr( __choices__ ), Parse( ":" || choices[i] )
)
)
)
);プロセス能力関数をループする素早い返信ありがとうございます。
kはiにリンクされていません
kはグループの項目数に似ており、iはグループです
as列はプロセス変数に対しては機能しましたが、スペックの制限とヒストグラムのクローズに対しては機能しません。
/*****************************************************
*********************** Cpk *********************
*****************************************************/
CPK=expr(for(i=1,i<=n items(choices),i++,
Process Capability(
Process Variables(as column(choices[i]) ),
Spec Limits(
as column(choices[i])(LSL( 400 ),
Target( 425 ), USL( 450 ))
),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{as column(choices[i]) <<
Process Capability Analysis( Histogram( 0 ) )},
Where( :Config == "P1_31_PBO" )
);
));
プロセス能力関数をループするあなたの唯一の構文上の問題は、col_name [i]の周りにAs Column()関数が必要だということです。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
dt:sex << set name( "Config" );
dt:height << set property( "spec limits", {LSL( 55 ), USL( 70 ), Show Limits( 0 )} );
dt:weight << set property( "spec limits", {LSL( 80 ), USL( 160 ), Show Limits( 0 )} );
config = {"F", "M"};
col_name = dt << get column names( string, continuous );
cpk = Expr(
For( k = 1, k <= N Items( col_name ), k++,
Process Capability(
Process Variables( As Column( col_name[i] ) ),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{choice[i] << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config == config[k] )
)
)
);
For( i = 1, i <= N Items( col_name ), i++,
cpk
);
私はまたあなたのFor Loop()を "k"を使って混乱させています。 1からNまでのアイテム(col_name)をループしてよろしいですか? col_nameは "i"変数にリンクされているようです。