Select item(s) from a character vector.
select.list(choices, preselect = NULL, multiple = FALSE, title = NULL, graphics = getOption("menu.graphics"))
a character vector of items.
a character vector, or
logical: can more than one item be selected?
optional character string for window title, or
logical: should a graphical widget be used?
The normal default is
graphics = TRUE.
this brings up a modal dialog box with a (scrollable) list
of items, which can be selected by the mouse. If
true, further items can be selected or deselected by holding the
control key down whilst selecting, and shift-clicking can be used to
Normal termination is via the ‘OK’ button or by hitting Enter or double-clicking an item. Selection can be aborted via the ‘Cancel’ button or pressing Escape.
this brings up a modal dialog box with a (scrollable) list of items, which can be selected by the mouse.
it will use a Tcl/Tk listbox widget if possible.
graphics is FALSE or no graphical widget is available 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.
It is an error to use
select.list in a non-interactive session.
A character vector of selected items. If
multiple is false and
no item was selected (or
Cancel was used),
multiple is true and no item was selected (or
Cancel was used) then a character vector of length 0 is returned.
tk_select.list for a graphical
version using Tcl/Tk.
## Not run: select.list(sort(.packages(all.available = TRUE))) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.