argsWidget             package:tkWidgets             R Documentation

_F_u_n_c_t_i_o_n_s _t_o _c_o_n_s_t_r_u_c_t _a _w_i_d_g_e_t _t_h_a_t _t_a_k_e_s _i_n_p_u_t_s _f_r_o_m _u_s_e_r_s

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

     Given a argument list, the functions construct a widget to allow
     users to entry or select values for arguments defined by the names
     of the argument list.

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

     argsWidget(argsList, defaultNames, inst = "")
     getPWidget(argsList, PWEnv, inst = "")
     formatArg(toFormat)
     getSymbol(args)
     funcs2Char(args,funcs)
     getTrueNullNa(toFormat)

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

argsList: 'argsList' a list of arguments with or without default
          values. The list can be derived from e.g. 'formals'

   PWEnv: 'PWEnv' an R environment used object to store data for the
          argument list

toFormat: 'toFormat' element to be formated by 'formatArg'

    args: 'args' arguments to be formated

   funcs: 'funcs' a list containing the arguments that are functions

defaultNames: 'defaultNames' a vector of character strings of length 2
          for two default buttons to be rendered. The first one is to
          end the process and the second to abort the process

    inst: 'inst' a character string for a short instuction that will
          appear on the top of a widget

_D_e_t_a_i_l_s:

     'argsWidget' builds a widget with widget elements to allow users
     to input values for the arguments.

     'getPWidget' instatiates primary widgets that will be used to
     construct the widget for argements.

     'formatArg' formats the value for a given argument so that the
     calue can be displayed by a tcltk widget.

     'getSymbol' filters out functions from the argument list.

     'funcs2Char' converts functions to character representations of
     the functions.

     'getTrueNullNa' converts string "true", "false", "null", and "na"
     to R primitives for these items.

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

     'argsWidget' returns a list with user input values for elements of
     the argument list passed.

     'getPWidget' returns a list of primary widgets.

     'formatArg' returns a list containing the formated values.

     'getSymbol' returns a list containing arguments that are
     functions.

     'funcs2Char' returns a list containing character representations
     of functions.

     'getTrueNullNa' returns an R object.

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

     Jianhua Zhang

_R_e_f_e_r_e_n_c_e_s:

     R tcltk

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

       if(interactive()){
           argsWidget(list("Entry with default" = "default",
                           "Entry without default" = ""))
       }

