Learn R Programming

aisdk (version 1.1.0)

console_confirm: Console Confirmation Prompt

Description

Ask a yes/no question with numbered choices. Returns TRUE for yes, FALSE for no, or NULL if cancelled.

Usage

console_confirm(question)

Value

TRUE if user selects Yes, FALSE for No, NULL

if cancelled.

Arguments

question

The question to display.

Examples

Run this code
# \donttest{
if (interactive()) {
  if (isTRUE(console_confirm("Overwrite existing file?"))) {
    message("Overwriting...")
  }
}
# }

Run the code above in your browser using DataLab