dlg_input.tcltkGUI | R Documentation |
Prompt for some data in a modal dialog box.
## S3 method for class 'tcltkGUI' dlg_input(message = "Enter a value", default = "", ..., gui = .GUI)
message |
The message to display in the dialog box. Use |
default |
The default value in the text box. Single string or |
... |
Not used yet. |
gui |
The 'gui' object concerned by this dialog box. |
The string the user wrote in the dialog box.
svDialogs::dlg_input()
library(svDialogstcltk) # Tcl/Tk dialog boxes are now used by default ## Not run: # Ask something... user <- dlg_input("Who are you?", Sys.info()["user"])$res if (!length(user)) {# The user clicked the 'cancel' button cat("OK, you prefer to stay anonymous!\n") } else { cat("Hello", user, "\n") } ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.