| console_confirm | R Documentation |
Ask a yes/no question with numbered choices. Returns TRUE for yes,
FALSE for no, or NULL if cancelled.
console_confirm(question)
question |
The question to display. |
TRUE if user selects Yes, FALSE for No, NULL
if cancelled.
if (interactive()) {
if (isTRUE(console_confirm("Overwrite existing file?"))) {
message("Overwriting...")
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.