EVOLUTION-MANAGER
Edit File: menu.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Menu Interaction Function</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for menu {utils}"><tr><td>menu {utils}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Menu Interaction Function</h2> <h3>Description</h3> <p><code>menu</code> 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 <span class="samp">0</span>. </p> <h3>Usage</h3> <pre> menu(choices, graphics = FALSE, title = NULL) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>choices</code></td> <td> <p>a character vector of choices</p> </td></tr> <tr valign="top"><td><code>graphics</code></td> <td> <p>a logical indicating whether a graphics menu should be used if available.</p> </td></tr> <tr valign="top"><td><code>title</code></td> <td> <p>a character string to be used as the title of the menu. <code>NULL</code> is also accepted.</p> </td></tr> </table> <h3>Details</h3> <p>If <code>graphics = TRUE</code> and a windowing system is available (Windows, macOS or X11 <em>via</em> Tcl/Tk) a listbox widget is used, otherwise a text menu. It is an error to use <code>menu</code> in a non-interactive session. </p> <p>Ten or fewer items will be displayed in a single column, more in multiple columns if possible within the current display width. </p> <p>No title is displayed if <code>title</code> is <code>NULL</code> or <code>""</code>. </p> <h3>Value</h3> <p>The number corresponding to the selected item, or 0 if no choice was made. </p> <h3>References</h3> <p>Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) <em>The New S Language</em>. Wadsworth & Brooks/Cole. </p> <h3>See Also</h3> <p><code><a href="select.list.html">select.list</a></code>, which is used to implement the graphical menu, and allows multiple selections. </p> <h3>Examples</h3> <pre> ## Not run: switch(menu(c("List letters", "List LETTERS")) + 1, cat("Nothing done\n"), letters, LETTERS) ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>utils</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>