View source: R/inputGATvariable.R
inputGATvariable | R Documentation |
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,
helpimg = "inputGATvariable",
backopt = TRUE,
checkopt = "Check this box.",
checkbox = FALSE,
valuebox = FALSE,
value = 0,
check = FALSE,
valueopt = "Enter a number:",
mylist = letters,
myvar = NULL,
bgcol = "lightskyblue3",
buttoncol = "cornflowerblue",
quitopt = "Quit",
tool = "GAT",
manual = "/docs/dev/articles/gat_tutorial.html"
)
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. |
helpimg |
A text string denoting the file name of the GAT PNG image to be shown, or path and filename of other image to be shown, (PNF, PFM, PPM, GIF) relative to the current working directory |
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. |
bgcol |
Text string containing UI background color. |
buttoncol |
Text string containing UI button color. |
quitopt |
Text string for the cancel button. |
tool |
Text string containing the name of the tool |
manual |
Text String containing the relative path of the tool instruction manual. For GAT, it is relative to the gatpkg directory, otherwise it is relative to the working directory. |
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."
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.