This function creates a dialog box to ask the user to select an item from a list and provides a link to the relevant help file in the GAT program. It includes options to add a check box or text box if desired.

Figure: Dialog to enter several values

inputGATvariable(
  title = "GAT window",
  instruction = "Select one.",
  help = "There is no help.",
  helppage = NULL,
  helptitle = NULL,
  step = 0,
  backopt = TRUE,
  checkopt = "Check this box.",
  checkbox = FALSE,
  valuebox = FALSE,
  value = 0,
  check = FALSE,
  valueopt = "Enter a number:",
  mylist = letters,
  myvar = NULL
)

Arguments

title

A text string that denotes the dialog title.

instruction

A text string stating the instructions to the user.

help

A text string containing the help message.

helppage

A text string that contains the function name for the relevant function (if any) in the help dialog.

helptitle

A text string that denotes the help dialog title.

step

Integer step in the GAT program, for help reference.

backopt

Boolean denoting whether to include the back button.

checkopt

The text that should accompany the checkbox. If checkbox is FALSE, this is ignored.

checkbox

A boolean that denotes whether or not to include a checkbox in the dialog.

valuebox

A boolean that denotes whether or not to include a valuebox in the dialog.

value

A number or string that denotes the default value for the text box.

check

Boolean denoting the status of the checkbox. If TRUE, the checkbox starts checked.

valueopt

The text that should accompany the valuebox. If valuebox is FALSE, this is ignored.

mylist

A character vector of variable names for the list.

myvar

Variable selected, if pre-defined.

Examples


if (interactive()) {
inputGATvariable(
  title = "My favorite letter", checkbox = TRUE, valuebox = TRUE,
  instruction = "Please select your favorite letter.",
  checkopt = "Check this box \nif you love all letters.",
  valueopt = "Enter the number of letters \nyou love."
)
}
#> $myvar
#> [1] "cancel"
#> 
#> $check
#> [1] FALSE
#> 
#> $threshold
#> [1] 0
#>