console_confirm: Console Confirmation Prompt

View source: R/console.R

console_confirmR Documentation

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)

Arguments

question

The question to display.

Value

TRUE if user selects Yes, FALSE for No, NULL if cancelled.

Examples


if (interactive()) {
  if (isTRUE(console_confirm("Overwrite existing file?"))) {
    message("Overwriting...")
  }
}


aisdk documentation built on May 29, 2026, 9:07 a.m.