도움말 안내에서 찾아봤는데 제대로 적용되고 있는 것 같은데 잘 안 되는 것 같습니다. 누군가 내가 뭔가를 놓치고 있는지 확인해 주시겠습니까?
다른 열에서 생성하고 값을 반올림한 열이 있습니다. 새 열의 값을 기반으로 행 범위만 유지하면 됩니다. 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 ) )
);예, 여기 내 데이터 세트 중 하나가 있습니다. 도움을 주셔서 감사합니다!
오 이런, 고마워. 그것은 말이 됩니다. 내 코드를 새 줄로 바꾸었지만 여전히 삭제해야 하는 다른 모든 행을 실제로 삭제하지는 않으므로 50000에서 50999 사이의 새 Y 값만 그래프로 표시합니다. 내가 무엇을 더 놓칠 수 있습니까?
그냥 논리적인 문제라고 생각합니다.
귀하의 select where 문:
dt << select where( :New Y < 50000 & :New Y > 50999 );
New Y는 50000보다 작을 수 없으므로 참이 될 수 없습니다. 그리고 동시에 50999보다 큽니다.
대신 다음을 원합니다.
dt << select where( 50000 <= :New Y <= 50999 );