tcltk package.pickFrom(vec, nsets = 1, return.indices = FALSE,
setlabels = NULL, edit.setlabels = TRUE,
subset = TRUE,
warningText = "one or more selections empty",
title = "Subset picker",
items.label = "Pick from:",
labels.prompt = "Your label for this set:",
list.height = 20,
items.scrollbar = TRUE,
preserve.order = TRUE,
listFont = "Courier 12",
labelFont = "Helvetica 11",
windowPos = "+150+30")TRUE) or vector
contents (FALSE) are to be returnedvec should be made available for selection. Default is
to make all elements available.vec to display
at oncevec is longer than list.heightvec
be maintained in all of the returned subsets?nsets components. Each component is a
selected sub-vector, or a numeric vector of indices for a
selected sub-vector (if return.indices is TRUE).
The component names are as specified in setlabels, or
as specified interactively. OR (if either "Cancel" or the close-window control button is used)
NULL.
return.indices is used together with subset, the
indices returned relate to vec, not to vec[subset].## This cannot be run by example() but should be OK when pasted
## into an interactive R session
pickFrom(c("apple", "banana", "plum", "grapefruit"), nsets = 2,
preserve.order = FALSE,
setlabels = c("Fruits I like", "Fruits I tolerate"))Run the code above in your browser using DataLab