Description Usage Arguments Details Value
This function will create a tcl/tk dialog box to get user
input. It has been written to be extensible so the R
programmer can easily create a dialog with any number of
varaibles with custom labels and data conversion of the
user entered data. The function will return a list where
the element names are vars
and the value is the
user input. By default, all entry will be converted using
the as.character
function. However, this can
easily be altered using the fun
parameter. For
example, if integers are required, use
fun=c(as.integer, ...)
. It is also possible to
write custom functions that can serve as a data
validation. See the examples.
1 2 3 4 |
vars |
character list of variable names. These will be the element names within the returned list. |
labels |
the labels the user will see for each variable entry. |
show |
a list of the same length of vars specifying how input should be shown. For example, use '*' for password entry. Is NA by default. |
fun |
list of functions that converts the user input. |
title |
the title of the dialog box. |
prompt |
the prompt the user will see on the dialog box. |
Adopted from Kay Cichini: http://thebiobucket.blogspot.com/2012/08/tcltk-gui-example-with-variable-input.html See also: http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/OKCancelDialog.html
a list
of named values entered by the user.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.