read_prompt {gofigR} | R Documentation |
Reads a prompt from stdin and performs optional validation
Description
Reads a prompt from stdin and performs optional validation
Usage
read_prompt(prompt, validate = NULL, attempt = 1, max_attempts = 2)
Arguments
prompt |
prompt, e.g. "Enter username: " |
validate |
function input => transformed input if input is valid or, error |
attempt |
current attempt at getting a valid input |
max_attempts |
maximum number of attempts |
Value
input, or result of validate(input) if validate is supplied
[Package gofigR version 1.1.0 Index]