테이블 스크립트안녕하세요. 이상치 분석을 수행 할 때 사용할 스크립트를 저장했습니다. 이들은 Fit Model 스크립트이며 루프를 사용하여 값을 숨기거나 제외 할 때마다 1 스크립트를 실행하려고합니다. 그러나 열 이름별로 스크립트 이름을 지정했습니다. 따라서 스크립트 이름이 열 이름과 일치하고 해당 스크립트 만 실행하고 싶습니다. Linnerud 샘플 데이터의 예를 고려했습니다.
dt = current data table();
col = dt << get column names( string );
nc = N Items( col );
For( i = 1, i <= nc, i++,
If( Contains( ColNames[i], "Outlier" ),
Col1 = Column(dt,i);
max = data table(dt);
max << select where(as column(Col1)==abs(Col Max( Col1 ))) << Hide and Exclude;
//Hide and exclude the MAX val from Outlier 1 Rest Pulse, and Run Outlier 1 Rest Pulse script
//Run Script("Outlier 1 Rest Pulse");
)
);이것이 가능한가?
Re : 테이블 스크립트네 가능합니다. 다음은 코드 업데이트입니다.
Names default to here(1);
dt = Current Data Table();
col = dt << get column names( string );
nc = N Items( col );
For( i = 1, i <= nc, i++,
// Clear the Hide and Excludes from the last loop
dt << clear rowstates;
If( Contains( Col[i], "Outlier" ),
Col1 = Column( dt, i );
dt << select where( As Column( Col1 ) == Abs( Col Max( Col1 ) ) ) << Hide and Exclude;
//Hide and exclude the MAX val from Outlier 1 Rest Pulse, and Run Outlier 1 Rest Pulse script
//Run Script("Outlier 1 Rest Pulse");
)
// Make sure Auto Recalc is unselected in the platforms you run, since if it is active, all
// the platforms will recalcuate to new results each time the different Hide and Excludes are changed
);