| console_input | R Documentation |
Prompt the user for free-text input with optional default value.
console_input(prompt, default = NULL)
prompt |
The prompt message to display. |
default |
Optional default value shown in brackets. Returned if user presses Enter without typing. |
The user's input string, default if empty input and default
is set, or NULL if empty input with no default.
if (interactive()) {
name <- console_input("Project name", default = "my-project")
api_key <- console_input("API key")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.