| questdlg | R Documentation |
This function aims to loosely mimic the behavior of the questdlg function on Matlab
questdlg(
quest,
dlgtitle = "",
btn = c("y", "n"),
defbtn = "n",
accepted_ans = c("y", "yes", "n", "no")
)
quest |
Question |
dlgtitle |
Title of question |
btn |
Vector of alternatives |
defbtn |
Scalar with the name of the default option |
accepted_ans |
Vector containing accepted answers |
Whatever is entered by the user after the prompt created by the function.
## Not run:
ans <- questdlg("Do you want to continue?", "Continue?")
if (tolower(substring(ans, 1, 1)) == "y") {
message("You typed yes")
} else {
message("You didn't type yes")
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.