Rev 35751 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{select.list}\alias{select.list}\title{Select Items from a List}\description{Select item(s) from a character vector.}\usage{select.list(list, preselect = NULL, multiple = FALSE, title = NULL)}\arguments{\item{list}{character. A list of items.}\item{preselect}{a character vector, or \code{NULL}. If non-null andif the string(s) appear in the list, the item(s) are selectedinitially.}\item{multiple}{logical: can more than one item be selected?}\item{title}{optional character string for window title.}}\details{#ifdef windowsThis brings up a modal dialog box with a (scrollable) list of items,which can be selected by the mouse. If \code{multiple} is true,further items can be selected or deselected by holding the control keydown whilst selecting, and shift-clicking can be used to selectranges.Normal termination is via the \code{OK} button or by hitting Enter.Selection can be aborted via the \code{Cancel} button or pressing Escape.#endif#ifdef unixUnder the AQUA interface for MacOS X this brings up a modal dialog boxwith a (scrollable) list of items, which can be selected by the mouse.Otherwise it displays a text list from which the user can choose bynumber(s). The \code{multiple = FALSE} case uses \code{\link{menu}}.Preselection is only supported for \code{multiple = TRUE}, where it isindicated by a \code{"+"} preceding the item.#endif}\value{A character vector of selected items. If \code{multiple} is false andno item was selected (or \code{Cancel} was used), \code{""} isreturned. If \code{multiple} is true and no item was selected (or\code{Cancel} was used) then a character vector of length 0 is returned.}\seealso{\code{\link{menu}}, \code{\link{tk_select.list}} for a graphicalversion using Tcl/Tk.}\examples{\dontrun{select.list(sort(.packages(all.available = TRUE)))}}\keyword{utilities}