Hi,
I am trying to do this in a for loop:
In current table, I have 14 Columns. Column #3~#14 were named as "Step 1" to "Step 12".
In the for loop, I want to create Column #15 (named as "Delta Step i" for i = 2, i <=12, i++), which is calculated with formula (Col(4) -Col(2)). Then Column#3 was deleted. The same formula will be reused in the next iteration.
Two problems here,
1) my formula doesn't work as there is no value in Column#15 of the output table;
2)I am worried that once column3 is detected, the values in Column15 (actually Column 14, after Column 3 is deleted) will be gone.
Here is my script.
For(i=2,i<=15,i++,
DeltaStep = "Delta Step "||Char(i);
New Column(DeltaStep)<<formula(Column(4) - Column(3));
Column(3)<<delete columns
);
I also tried this, but not working, either.
For(i=2,i<=12,i++,
DeltaStep = "Delta Step "||Char(i);
Pre = Column(3) << getname;
Pst = Column(4) << getname;
New Column(DeltaStep)<<formula(:Pst - :Pre);
Column(3)<<delete columns
);