select.list              package:utils              R Documentation

_S_e_l_e_c_t _I_t_e_m_s _f_r_o_m _a _L_i_s_t

_D_e_s_c_r_i_p_t_i_o_n:

     Select item(s) from a character vector.

_U_s_a_g_e:

     select.list(list, preselect = NULL, multiple = FALSE, title = NULL)

_A_r_g_u_m_e_n_t_s:

    list: character. A list of items.

preselect: a character vector, or 'NULL'.  If non-null and if the
          string(s) appear in the list, the item(s) are selected
          initially.

multiple: logical: can more than one item be selected?

   title: optional character string for window title.

_D_e_t_a_i_l_s:

     Under the AQUA interface for MacOS X this brings up a modal dialog
     box with a (scrollable) list of items, which can be selected by
     the mouse.

     Otherwise it displays a text list from which the user can choose
     by number(s). The 'multiple = FALSE' case uses 'menu'.
     Preselection is only supported for 'multiple = TRUE', where it is
     indicated by a '"+"' preceding the item.

_V_a_l_u_e:

     A character vector of selected items.  If 'multiple' is false and
     no item was selected (or 'Cancel' was used), '""' is returned.  
     If 'multiple' is true and no item was selected (or 'Cancel' was
     used) then a character vector of length 0 is returned.

_S_e_e _A_l_s_o:

     'menu', 'tk_select.list' for a graphical version using Tcl/Tk.

_E_x_a_m_p_l_e_s:

     ## Not run: 
     select.list(sort(.packages(all.available = TRUE)))
     ## End(Not run)

