gui.menu {utilitiesR} | R Documentation |
This is a cross-platform function to allow the user to
choose an item from a list of items interactively. If
graphics=TRUE
, select.list
is used on
Windows (similar to the "Select CRAN repository..." when
you install.packages
), and
tcltk::tk_select.list
otherwise (& if supported),
and an interactive text interface
(menu(...,graphics=F)
) if all else fails.
gui.menu(choices, title = NULL, multi = FALSE, index.return = FALSE, graphics = TRUE)
choices |
vector of choices to select from |
index.return |
whether to return the selected item
from |
title |
title for dialog |
multi |
whether to allow selection of multiple items |
graphics |
whether to present a graphics interface (if possible) |
the item(s) chosen (vector), either indices or values,
depending on index.return
. If is.empty
is
TRUE
, the user selected 'Cancel'.
Other ui: dir.browse
,
file.browse
, Filters
,
gui.dir.choose
,
gui.file.choose
,
gui.readline
, gui.yesno
,
tk_entry.dialog
,
tk_select.list