ask_yes_no | R Documentation |
This function prompts the user with a yes/no question and handles various inputs. If the user input is not valid, it defaults to the specified default value.
ask_yes_no(prompt_message, default = "n")
prompt_message |
The message to display as the prompt. |
default |
The default value if the user input is invalid (default: "n"). |
A character vector "y" for yes, "n" for no.
response <- ask_yes_no("Start an interactive slurm job with salloc?", default = "n")
cat("User response:", response, "\n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.