Hi community,
I'm trying to write a JSL script to set a normalization formula with dynamic column reference.
What's wrong here?
"Mean(M4_pop)" & "Std Dev(M4_pop)" are fix columns that are to be used for the normalization.
dt = Current Data Table();
numCols = dt << Get Column Names( Numeric, "String" );
For( i = 1, i <= N Items( numCols ), i++,
colName = numCols[i];
normColName = colName || "_norm";
dt << New Column(
normColName,
Numeric,
Continuous,
Formula( (colName- :"Mean(M4_pop)"n) / :"Std Dev(M4_pop)"n)
);
);