Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Column( "Compare",
Numeric,
"Continuous",
Format( "Percent", 12, 0 ),
Formula( :weight / :height )
);
// Changing the 2nd rows value for Weight to 59 will work with
// a simple assignment statement
dt:weight[2] = 59;
// One can not change a cell in a formula column,
// unless you change the complete formula
dt:compare << set formula(
:weight / :height;
if( :weight / :height > 1, 1)
);
Probably the method that I use most often, is to Delete the formula from a column that was created using a formula. Deleting the formula, converts the column into a normal static column, keeping all of the values. You can then just make the changes you need, using standard assignment statements.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Column( "ratio",
Numeric,
"Continuous",
Format( "Percent", 12, 0 ),
Formula( :weight / :height )
);
dt << run formulas;
dt:ratio << delete formula;
For Each Row( If( :ratio > 1, :ratio = 1 ) )
;
Jim