ヘルプガイドでこれを調べてみましたが、正しく適用しているようですが、動作していないようです。誰かが私が何かを逃していないかどうかを確認していただけますか?
別の列から作成し、値を丸めた列があります。新しい列の値に基づいて、行の範囲のみを保持する必要があります。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より大きい。
代わりに、あなたは欲しい:
dt << select where( 50000 <= :New Y <= 50999 );
ああ、ありがとう。それは理にかなっています。コードを新しい行に置き換えましたが、実際には削除する必要のある他のすべての行は削除されないため、50000から50999の間の新しいY値のみをグラフ化しています。他に何が欠けているのでしょうか?
はい、これが私のデータセットの1つです。助けてくれてありがとう!
こんにちは、私はまだ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 ) )
);