menu                  package:base                  R Documentation

_M_e_n_u _I_n_t_e_r_a_c_t_i_o_n _F_u_n_c_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     `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'.

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

 choices: a character vector of choices

graphics: a logical indicating whether a graphics menu should be used. 
          Currently unused.

   title: a character string to be used as the title of the menu

_V_a_l_u_e:

     The number corresponding to the selected item, or 0 if no choice
     was made.

_E_x_a_m_p_l_e_s:

     switch(menu(c("List letters", "List LETTERS")) + 1,
            cat("Nothing done\n"), letters, LETTERS)

