I have a hard time believing this hasn't been asked before and must be searching the wrong keywords.
Background: I am assuming a user has run Fit Model and saved a result of interest as Script to the Data Table. I have written JSL to extract the Effects() argument from the saved script. Let's suppose we have Effects( :A, :B:, :A*:B).
I have already written JSL that gets this result (as long as I am NOT using Transform Column() in the model's effect list -- that would create a whole new can of worms):
testList = {:A, :B, :A*:B};My Current Task: I want to write JSL to enable my user to select one of these three effects.
Current Status: What I have done so far is this:
win = New Window( "Test", Panel Box( "Choose an Effect", Radio Box( testList ) ) );
If I run this, I get a Radio Box with the effects "A", "B", and "Multiply". Clearly the Display Box is choosing to pull the Head() off the third effect, rather than simply showing "A*B".
Possible Solution: I think I could fix this by writing a loop to check Head(testList[i])=="Multiply()" and if it is, then code another loop to extract each of the Arg(testList[i], j), convert these to characters, put them in another list, and Concat Items() them with a "*" separator.
Question: Is there a more direct route than this that will give me a Radio Box with the effects "A", "B", and "A*B"?