tk_select.list | R Documentation |
Select item(s) from a character vector using a Tk listbox.
tk_select.list(choices, preselect = NULL, multiple = FALSE, title = NULL)
choices |
a character vector of items. |
preselect |
a character vector, or |
multiple |
logical: can more than one item be selected? |
title |
optional character string for window title, or
|
This is a version of select.list
implemented as a Tk
list box plus OK
and Cancel
buttons. There will be a
scrollbar if the list is too long to fit comfortably on the screen.
The dialog box is modal, so a selection must be made or
cancelled before the R session can proceed. Double-clicking on an
item is equivalent to selecting it and then clicking OK
.
If Tk is version 8.5 or later, themed widgets will be used.
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.
select.list
(a text version except on Windows and the macOS GUI),
menu
(whose graphics = TRUE
mode uses this
on most Unix-alikes).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.