Hello,
I have a simple script where I want to create a new column in which a formula calculate the absolute value of another column.
the column is referenced in a list.
I tried a few different ways, but I can't figure out how to evaluate the referenced column so I end up with an empty formula column. Any suggestion would be greatly appreciated.
Best
Sebastien
dt=New Table( "test",
Add Rows( 4 ),
New Column( "symbol",
Character,
"Nominal",
Set Values( {"a", "b", "c", "d"} ),
Set Display Width( 55 )
),
New Column( "fold change",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [-3, -0.4, 0.4, 3] ),
Set Display Width( 68 )
)
);
l={"fold change"};
try(New Column( "absolute fold change",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( Abs( l[1] )
)));
try(New Column( "absolute fold change 2",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( eval(column(l[1]) )
)));