menu(x)
x
| a character vector of choices |
menu
presents the user with a menu of choices labelled from 1
to the number of choices. To exit without choosing an item one can
select `0'.
switch(menu(c("List letters", "List LETTERS")) + 1, cat("Nothing done\n"), letters, LETTERS)