ModelDlg: Compose Model Formula

View source: R/Dialogs.R

ModelDlgR Documentation

Compose Model Formula

Description

ModelDlg() allows to compose model formulas based on the variablenames of a data.frame. The available variables can be filtered and sorted, which is helpful to keep the overview. Additional orientation is provided by the comments with which variables can be assigned. (See Label()). The labels will be displayed below the variable list.

The model dialog can also be used to edit an already existing formula. Simply select the model formula (including the data argument) and start the dialog.

Usage

ModelDlg(x, ...)

Arguments

x

the data frame containing the variables for the model.

...

further arguments to be passed to the default function.

Details

In the model dialog, the variablenames (extended with their class) of the selected data.frame are listed on the right, from where they can be inserted in the model box by clicking on a button between the two boxes. Clicking on the + button will use + to concatenate the variablenames. The same applies analogously to * and :. x2 inserts the chunk poly(<varname>, 2), the grade of the polynom can easily be changed in the formula edit field afterwards.

Any criteria for the variablename can be entered in the filterbox. The filter will be dynamically applied to the list. In order to get rid of the filter just empty the filterbox.

Model dialog

After clicking on ok, the formula temperature ~ area + driver + delivery_min, data=d.pizza will be inserted on the cursor position.

An already constructed formula can also be provided to the function. The model dialog will separate the single parts and populate the according textboxes.

Value

the model formula

Author(s)

Andri Signorell <andri@signorell.net>

See Also

formula

Examples

## Not run: 
ModelDlg(d.pizza)

## End(Not run)

AndriSignorell/DescToolsAddIns documentation built on May 15, 2022, 2:13 p.m.