## A simple information box
dlgMessage("Hello world!")$res
## Ask to continue
dlgMessage(c("This is a long task!", "Continue?"), "okcancel")$res
## Ask a question
dlgMessage("Do you like apples?", "yesno")$res
## Idem, but one can interrupt too
res <- dlgMessage("Do you like oranges?", "yesnocancel")$res
if (res == "cancel") cat("Ah, ah! You refuse to answer!
")
## Simpler version with msgBox and okCancelBox
msgBox("Information message") # Use this to interrupt script and inform user
if (okCancelBox("Continue?")) cat("we continue
") else cat("stop it!
")
Run the code above in your browser using DataLab