\HeaderA{select.list}{Select Items from a List}{select.list}
\keyword{utilities}{select.list}
\begin{Description}\relax
Select item(s) from a character vector.
\end{Description}
\begin{Usage}
\begin{verbatim}
select.list(list, preselect = NULL, multiple = FALSE, title = NULL)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{list}] character. A list of items.
\item[\code{preselect}] a character vector, or \code{NULL}.  If non-null and
if the string(s) appear in the list, the item(s) are selected
initially.
\item[\code{multiple}] logical: can more than one item be selected?
\item[\code{title}] optional character string for window title.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
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 \code{multiple = FALSE} case uses \code{\LinkA{menu}{menu}}.
Preselection is only supported for \code{multiple = TRUE}, where it is
indicated by a \code{"+"} preceding the item.
\end{Details}
\begin{Value}
A character vector of selected items.  If \code{multiple} is false and
no item was selected (or \code{Cancel} was used), \code{""} is
returned.   If \code{multiple} is true and no item was selected (or
\code{Cancel} was used) then a character vector of length 0 is returned.
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{menu}{menu}}, \code{\LinkA{tk\_select.list}{tk.Rul.select.list}} for a graphical
version using Tcl/Tk.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}## Not run: 
select.list(sort(.packages(all.available = TRUE)))
## End(Not run)\end{ExampleCode}
\end{Examples}

