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