powered by
Prompt the user for free-text input with optional default value.
console_input(prompt, default = NULL)
The user's input string, default if empty input and default is set, or NULL if empty input with no default.
default
NULL
The prompt message to display.
Optional default value shown in brackets. Returned if user presses Enter without typing.
# \donttest{ if (interactive()) { name <- console_input("Project name", default = "my-project") api_key <- console_input("API key") } # }
Run the code above in your browser using DataLab