평가 표현식이 작동하지 않습니다이 문제는 항상 헷갈렸어요. 이전에 효과가 있었던 공식을 바탕으로 이 공식을 만들었습니다.
// Get the current data table
dt = Current Data Table();
colNames = dt << get column names( continuous, string );
// Loop through all columns
For each( {col}, colNames,
Eval(
Eval Expr(
New Column(
Expr( col ) || "_Gouge",
Numeric,
"Continuous",
Format( "Best", 10 ),
Formula( (Mean( As Column( Eval(col) ) [Index(1, 100)]) + Mean(As Column(Eval(col)) [Index(N Rows() - 99, N Rows())])) / 2 - Col Minimum(As Column(Eval(col)) ) )
);
)
);
);
해당 공식은 아직 평가되지 않은 것으로 보입니다.
자동화 및 스크립팅제목: Eval Expr이 작동하지 않습니다As Column( Eval( col ) )는 As Column( Expr( col ) )이어야 합니다.
제목: Eval Expr이 작동하지 않습니다완성된 모습은 이렇습니다.
// Get the current data table
dt = Current Data Table();
colNames = dt << get column names( continuous, string );
// Loop through all columns
For each( {col}, colNames,
Eval(
Eval Expr(
New Column(
Expr( col ) || "_Gouge",
Numeric,
"Continuous",
Format( "Best", 10 ),
Formula( (Mean( As Column( Expr( col ) ) [Index(1, 100)]) + Mean(As Column( Expr( col ) ) [Index(N Rows() - 99, N Rows())])) / 2 - Col Minimum(As Column( Expr( col )) ) )
);
)
);
);
제목: Eval Expr이 작동하지 않습니다아래 코드를 사용할 수도 있습니다. 이 코드는 마치 수식 편집기에서 열을 추가한 것처럼 보이는 열 참조를 생성합니다.
장점 중 하나는 입력 열의 이름을 변경해도 수식이 여전히 작동한다는 것입니다.
dt = Current Data Table();
colNames = dt << get column names( continuous, string );
// Loop through all columns
For each( {col}, colNames,
Eval(
Eval Expr(
New Column(
col || "_Gouge",
Numeric,
"Continuous",
Format( "Best", 10 ),
Formula( (Mean( Expr(Name Expr(As Column( col ) )) [Index(1, 100)]) + Mean(Expr(Name Expr(As Column( col ) )) [Index(N Rows() - 99, N Rows())])) / 2 - Col Minimum(Expr(Name Expr(As Column( col )) )) )
);
)
);
);