read.yesno {coda} | R Documentation |
This is a utility function for interactively reading a logical value from the command line.
The prompt string is printed, along a hint about the default answer. Answers "yes", "YES", "no", "NO" or any partial match are accepted. If the user enters a blank line, the default value is returned.
read.yesno(string, default=TRUE)
string |
A string to prompt the user with |
default |
Logical value giving the default answer |
A single logical value.
Martyn Plummer