다시 : 스크립트에서 다른 열로 수식을 사용하는 방법당신은 매우 가깝습니다. 당신이해야 할 일은 대체 할 두 번째 값을 만들고 대체 할 i + 1 열을 참조하는 것입니다.
names default to here(2);
dt=open("$SAMPLE_DATA/blood pressure.jmp");
numericColNames = dt << get column names( string, numeric );
For( i = 1, i <= N Items( numericColNames ) - 1, i += 2,
Eval(
Substitute(
Expr(
New Column( Char( numericColNames[i] ) || "_Stand",
Numeric,
Continuous,
Formula( (__col1__) / (__col2__) )
)
),
Expr( __col1__ ), Parse( ":" || numericColNames[i] ),
Expr( __col2__ ), Parse( ":" || numericColNames[i+1] )
)
)
);
스크립트에서 다른 열에 수식을 사용하는 방법안녕하세요.
숫자 열이있는 데이터 테이블이 있고 열 1을 열 2로, 열 3을 열 4로 나눈 결과 등으로 새 열을 만들려고합니다.
나는이 스크립트를 가지고 있지만 내 문제는 배당에서 2 열을 나타내는 방법을 모른다는 것입니다.
numericColNames = dt << get column names( string, numeric );
For( i = 1, i <= N Items( numericColNames ) - 1, i += 2,
Eval(
Substitute(
Expr(
New Column( Char( numericColNames[i] ) || "_Stand",
Numeric,
Continuous,
Formula( (__col__) / (__col__) )
)
),
Expr( __col__ ), Parse( ":" || numericColNames[i] )
)
)
);스크립팅다시 : 스크립트에서 다른 열로 수식을 사용하는 방법대단히 감사합니다 넬슨. 내가 찾던 것입니다.