Re:スクリプト内の異なる列で数式を使用する方法あなたはとても近いです。 あなたがする必要があるのは、置換する2番目の値を作成し、その置換のために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] )
)
)
);スクリプティングRe:スクリプト内の異なる列で数式を使用する方法どうもありがとうございました ネルソン。探していたものです。