obj << Column Switcher(<default_col>(<col1>, <col2>, ...);
// add a Column Switcher to the report
obj << Remove Column Switcher();
// remove the Column Switcher from a report
For example, add the Column Switcher to a Contingency report for the Car Poll.jmp data as follows:
dt = Open( "$SAMPLE_DATA/Car Poll.jmp" );
obj = Contingency(
Y( :size ),
X( :marital status )
);
ColumnSwitcherObject = obj <<
Column Switcher(
:marital status,
{:sex, :country, :marital status}
);
ColumnSwitcherObject << Set Size( 200 );
// number of pixels for the switcher width
ColumnSwitcherObject << Set NLines( 6 );
// number of columns to display in the switcher