안녕하세요,
스크립트의 나머지 부분을 실행하기 전에 열에 정수만 포함되어 있는지 확인해야 하는데 그 방법을 모르겠습니다. 이상적으로는 소수 값이 있는 행을 정확하게 식별할 수 있기를 바랍니다.
도움을 주셔서 미리 감사드립니다!
정말 아름다운 솔루션입니다!! 감사해요 @Mark_Bailey
마지막 줄을 참조하십시오.
Names Default to Here( 1 );
// generate test case with a mix of 90% integers and 10% non-integers
data = J( 30, 1,
If( Random Uniform() < 0.1,
Random Normal(),
Random Integer( -6, 6 )
);
);
// check results
Show( data );
// make a data table example
dt = New Table( "Test Cases",
New Column( "Data", Numeric, Continuous,
Values( data )
)
);
// now the solution
nonIntegersHere = dt << Get Rows Where( Modulo( :Data, 1 ) );