ヘルプガイドでこれを調べてみたところ、正しく適用できているように見えますが、機能していないようです。 誰かが私に何かが欠けていないか確認してもらえますか?
別の列から作成し、値を四捨五入した列があります。 新しい列の値に基づいて行の範囲のみを保持する必要があります。 50000 ~ 50999 の間の新しい Y 値のみを保持し、残りの行を削除したいと考えています。
これは、このコマンドを含むスクリプトの一部ですが、機能しません。 現在作業している行が機能する前にコメントアウトされた行が表示されますが、現在は 50000 番台の範囲に保持する必要がある他の値がある可能性があります。
必要に応じて、参考としてスクリプト全体も添付しました。
dt = Current Data Table();
Column( dt, "X coordinate" ) << data type( Numeric ) << Modeling Type( Continuous ) << Format( Best, 12 );
dt << New Column( "New Y", Numeric, Nominal, Width( 5 ), Formula( Round( Y coordinate ) ) );
//dt << select where( :New Y != 50503 );
dt << select where( :New Y < 50000 & :New Y > 50999 );
dt << delete rows;
dt << New Column( "Normalized", Numeric, Continuous, Width( 10 ), Precision( 7 ), Formula( IntenCD / Col Max( IntenCD ) ) );
ご協力をよろしくお願いいたします。
Clear Symbols();
Names Default To Here( 1 );
framex_value = "";
lotid_value = "";
w = New Window( "Requested Information", // opens a window with a title and this content...
<<RETURN result=""> 50999 );
dt << delete rows;
dt << New Column( "Normalized", Numeric, Continuous, Width( 10 ), Precision( 7 ), Formula( IntenCD / Col Max( IntenCD ) ) );
// Determine Matrix
xMat = Matrix( 76200 - (framex_value / 2) ) |/ Matrix( 76200 - (framex_value / 2) ) |/ Matrix( 76200 + (framex_value / 2) ) |/
Matrix( 76200 + (framex_value / 2) );
// The yMat is static
yMat = [1, 0.92, 0.92, 1];
// The overall delta
overallDelta = Col Max( dt:Normalized ) - Col Min( dt:Normalized );
//The delta between the lines
withinOrangeDelta = Col Max(
If( dt:X coordinate > (76200 - (framex_value / 2)) & dt:X coordinate < (76200 + (framex_value / 2)),
dt:Normalized,
.
)
) - Col Max( dt:Normalized ) - Col Min( dt:Normalized ) + 1;
Col Min( If( dt:X coordinate > (76200 - (framex_value / 2)) & dt:X coordinate < (76200 + (framex_value / 2)), dt:Normalized, . ) );
// Graph Builer and Delta display
gb = dt << Graph Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Variables( X( dt:X Coordinate ), Y( dt:Normalized ) ),
Elements( Points( X, Y, Legend( 5 ) ) )
);
Report( gb )[FrameBox( 1 )] << Add Graphics Script(
Pen Color( "orange" );
Pen Size( 2 );
Line( xmat, ymat );
// Add the results to the chart
Text( Boxed, {75000, .94}, "Overall Delta = " || Char( Format( overallDelta, 7, 4 ) ) );
Text( Boxed, {75000, .93}, "Within Frame Delta = " || Char( Format( withinOrangeDelta, 7, 4 ) ) );
);
Report( gb )[AxisBox( 2 )] << Min( .91 );
Report( gb )<<SAVE picture=""></SAVE></RETURN>
完璧、うまくいきました。 助けてくれてありがとう!
使用する Select Where() 句は次のとおりです。
dt << select where( :New Y <= 50000 | :New Y >= 50999 );
こんにちは。特定の範囲の Y 座標以外をすべて削除する方法がまだわかりません。 以前のヘルプの更新により、これは私が取り組んでいるセクションの新しいスクリプトです。 したがって、50000 から 50999 までの Y 値のみを保持し、残りを削除する必要があります。
dt = Current Data Table();
Column( dt, "X coordinate" ) << data type( Numeric ) << Modeling Type( Continuous ) << Format( Best, 12 );
dt << New Column( "New Y", Numeric, Continuous, Width( 10 ), Formula( Round( Y coordinate, 0 ) ) );
//dt << select where( :New Y != 50503 );
dt << select where( 50000 <= :New Y <= 50999 );
dt << delete rows;
dt << New Column( "Normalized",
Numeric,
Continuous,
Width( 10 ),
Precision( 7 ),
Formula( IntenCD / Col Max( IntenCD ) )
);はい、これが私のデータセットの 1 つです。ご協力ありがとうございます。
ああ、ありがとう。 それは理にかなっています。 コードをその新しい行に置き換えましたが、実際には削除が必要な他のすべての行はまだ削除されていないため、50000 から 50999 までの新しい Y 値のみをグラフ化しています。 他に何が欠けているでしょうか?
それは単なる論理の問題だと思います。
select where ステートメント:
dt << select where( :New Y < 50000 & :New Y > 50999 );
:New Y は 50000 未満にはならないため、決して true になることはありませんと同時に 50999 を超えます。
代わりに、次のことが必要です。
dt << select where( 50000 <= :New Y <= 50999 );