I would like to create a V List Box of overlay plots only for those columns that exist in a data file. The names of the columns may change from file to file, or may be absent or present. I've been able to test for the presence of a column name before creating individual overlay plots, I can't figure out how to check for column names within a V List Box and for the V List Box to plot those overlay plots that correspond to existing columns and not hang when a column is absent. Any suggestions would be greatly appreciated.
dt = open("$sample_data\Big Class.jmp");
col_name_list = dt << get column names( string );
V List Box(
If( !Contains( col_name_list, :"height" ),
Overlay Plot(
X( :Name( "height" ) ),
Y( :Name( "weight" ) ),
Y Scale( Left, Right ),
Separate Axes( 1 ),
Connect Thru Missing( 1 )
),
);
If( !Contains( col_name_list, :"age" ),
Overlay Plot(
X( :Name( "age" ) ),
Y( :Name( "weight" ) ),
Y Scale( Left, Right ),
Separate Axes( 1 ),
Connect Thru Missing( 1 )
),
);
If( !Contains( col_name_list, :"ratio" ),
Overlay Plot(
X( :Name( "bmi" ) ),
Y( :Name( "weight" ) ),
Y Scale( Left, Right ),
Separate Axes( 1 ),
Connect Thru Missing( 1 )
),
);
);