| console_menu | R Documentation |
Present a numbered list of choices and return the user's selection.
Styled with cli to match the console chat interface. Similar to
utils::menu() but with cli formatting.
console_menu(title, choices)
title |
The question or prompt to display. |
choices |
Character vector of options to present. |
The index of the selected choice (integer), or NULL if
cancelled (user enters 'q' or empty input).
if (interactive()) {
selection <- console_menu("Which database?", c("PostgreSQL", "SQLite", "DuckDB"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.