Hi Everyone,
I’m having some trouble drafting a script that will save me hours of time with some DOE analyses we are doing on a regular basis.
Here’s what I want the script to do:
1) Create a new variable for every original variable in the cc = {Variables} command that you can find in the script. THIS WORKS FINE.
2) For each new variable created I want to attach a conditional statement that will evaluate whether or not the data contained in the original variable is above some threshold value.
I feel like I’m getting close, the issue is that within the conditional statement the actual name of the variable in the cc command is not being passed properly. Therefore, my script errors out.
If you could be so gracious I’d like to understand better what is going wrong here. To aid I’ve attached some simulated data and the current script I am working on.
Also, I want to just make sure that within a script it is ok to pass multiple conditional statements on to multiple variables.
Thank you very much for any assistance in helping me learn from this issue.
Script (also attached as well as data)
cd = Current Data Table();
// User specified column names
cc = {C1 RLU, C2 RLU, C3 RLU};
For( i = 1, i <= N Items(cc), i++,
New Column(Char(cc[i]) || "5e3" , Numeric, formula(IF (cc[i] > 5000, 1, 0)));
(New Column(Char(cc[i]) || "1e4" , Numeric )); 10000 // if first conditional worked a second would be created here for 10000
(New Column(Char(cc[i]) || "2e4" , Numeric ))); 20000 // another conditional here for 20000