

menu {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)

