<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
I would like to make a subset with the columns that a user chooses from a Col List Box. I have used the Col List Box example from the Scripting Guide but I don't know how to use the values of Chosen Columns = { "col1", "col2", "col3" } as column names to create a subset. Can anyone help me out?
Thank you! I am able to make this method work for my script.
Subset() appears to resolve a list of column names as in the example below (the conditional if() should not be necessary but JMP 10 crash for me if trying to do a subset with an empty list, i.e. if no columns was selected).
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Window( "Select columns",
lb = Col List Box( all ),
Button Box( "make subset",
If( N Items( lb << get selected ) >= 1,
dt << subset( columns( lb << get selected ) )
)
)
);