Dialog to select items from a list

Share:

Description

Presents the user with a dialog box to select items from a list.

Usage

1
2
3
selectorWidget(options, selected = character(0), title = "Selector",
               ordersel = FALSE, ordernsel = FALSE, 
               height = max(10,min(20,length(options))))

Arguments

options

vector, options to be selected from

selected

vector, subset of options selected by default

title

character scalar, window title

ordersel

boolean, keep the selected items in order?

ordernsel

boolean, keep the not selected items in order?

height

scalar, height of the two listboxes

Value

A character vector containing the selected items. If a vector of a different class was initially provided, it must be manually coerced back to the correct type.

Author(s)

Colin A. Smith, annaffy@colinsmith.org

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.