Column Dialog(), a variant of the deprecated Dialog() function, lets you prompt for column selections from the current data table or contextual data table. The OK, Cancel, and Remove buttons and the list of columns to choose from the data table are added automatically.
dlg = Column Dialog(
Group = Col List( "Group Factors" ),
Split = Col List( "Y, Response" ),
w = Col List( "Weight" ),
图 11.35 Column Dialog
For each destination list, a Col List clause must be a direct argument of Column Dialog() (not nested inside some other argument). An optional MaxCol(n) argument restricts the number of data columns that can be chosen to n. Lists are always returned, although they can sometimes be empty lists. You can include as many as twelve Col List clauses.
Other items permitted in the deprecated Dialog() are permitted in Column Dialog() and have the same functionality. You can specify the minimum and maximum number of columns that are allowed in a column dialog box with the MinCol and MaxCol arguments.
You can also specify the modeling type of the columns that are allowed to be selected (Ordinal, Nominal or Continuous). You can set the width of the list using Select List Width(pixels) argument. To set the width of the column list, use Width(pixels) inside the Col List() function.
rt_dlg = Column Dialog(
图 11.36 Restricting Selection of Columns
In addition, use the Columns specification to pre-fill some column selections. For example, the following script assigns height to the X role and weight and age to the Y role:
dlg = Column Dialog(
xCols = Col List( "X, Factors", Columns( :height ) ),
yCols = Col List( "Y, Response", Columns( :weight, :age ) )