Using a list of column names in a varability chartWhen creating multiple variability graphs, JMP generates a script example similar to the code below that includes the multiple Y Response columns as a comma separated list.
Variability Chart(
Y( :Col1, :Col2 ),
Model( "Main Effect" ),
X( :unit )
);
If I have a list of columns that I would like to generate graphs for:
ListofColumnNames= dt << Get Column Names();
ListofColumnNames= {Col1, Col2, ...}
Is there a way to expand this list in line to create essentially the same comma separated list that JMP created?
Variability Chart(
Y( Column(ListofColumnNames)), // I know this syntax does not work, but conveys the intent.
Model( "Main Effect" ),
X( :unit )
);
I know that this can be accomplished using a For Loop
Y( Column(ListofColumnNames[i])),
but wondered if there was a way to avoid the For Loop and invoke the Variability Chart only one time by passing the entire list (for speed).
Automation and ScriptingRe: Using a list of column names in a varability chartChange the Column() function to an Eval() function and it should all work. Here is a working example:
names default to here(1);
dt=
// Open Data Table: semiconductor capability.jmp
// → Data Table( "semiconductor capability" )
Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
ListofColumnNames = dt << Get Column Names();
remove from(ListofColumnNames, 1, 4 );
// Just so there arn't so many columns to analyze
remove from(ListofColumnNames, 10, 118 );
Variability Chart(
Y( eval( ListofColumnNames ) ), // I know this syntax does not work, but conveys the intent.
Model( "Main Effect" ),
X( :lot_id )
);
Re: Using a list of column names in a varability chartThank you. That worked exactly as I wanted.