menu
Menu Interaction Function

Description

Creates a menu.

Usage

menu(choices, graphics = FALSE, title = NULL) 

Arguments

choices a character vector giving the menu choices to present to the user.
graphics this argument is ignored.
title a character string specifying the title of the menu. The default is NULL.

Details

Use this function only in interactive mode. See interactive for details on the exact conditions.
A list of choices is presented to the user, and then waits for the user to select an item.
Value
returns the number corresponding to the selected item. If no selection is made, returns 0.
See Also
interactive, select.list. If you want the user to be able to specify a text value, use parse or readline,
Examples
## Not run: 
items <- c("List Objects", "Exit from TERR")
switch(menu(items)+1, cat("No Action\n"), ls.str(), q())

## End(Not run)
Package utils version 6.0.0-69
Package Index