# NOT RUN {
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")
}
# }
Run the code above in your browser using DataLab