pickFrom               package:relimp               R Documentation

_P_i_c_k _S_u_b_s_e_t_s _f_r_o_m _a _V_e_c_t_o_r

_D_e_s_c_r_i_p_t_i_o_n:

     Provides a Tk dialog for interactive selection of one or more
     subsets from a vector.  Requires the 'tcltk' package.

_U_s_a_g_e:

     pickFrom(vec, nsets = 1, return.indices = FALSE, setlabels = NULL,
       title = "Subset picker",
       items.label = "Pick from:")

_A_r_g_u_m_e_n_t_s:

     vec: a vector

   nsets: an integer, the number of subsets to be selected

return.indices: logical, whether indices ('TRUE') or vector contents
          ('FALSE') are to be returned

setlabels: a character vector of labels for the subsets

   title: title of the Tk dialog window

items.label: a label for the set of items to be selected from

_V_a_l_u_e:

     A list, with '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 interactively.

_A_u_t_h_o_r(_s):

     David Firth, d.firth@warwick.ac.uk

_E_x_a_m_p_l_e_s:

     ## This cannot be run by example() but should be OK when pasted
     ## into an interactive R session
     ## Not run: 
     pickFrom(c("apple", "banana", "plum", "grapefruit"), nsets = 2,
       setlabels = c("Fruits I like", "Fruits I tolerate"))
     ## End(Not run)

