MethodsList-class          package:methods          R Documentation

_C_l_a_s_s _M_e_t_h_o_d_s_L_i_s_t, _R_e_p_r_e_s_e_n_t_a_t_i_o_n _o_f _M_e_t_h_o_d_s _f_o_r _a _G_e_n_e_r_i_c _F_u_n_c_t_i_o_n

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

     Objects from this class are generated and revised by the
     definition of methods for a generic function.

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

     Suppose a function 'f' has formal arguments 'x' and 'y'.  The
     methods list object for that function has the object
     'as.name("x")' as its 'argument' slot.  An element of the methods
     named '"track"' is selected if the actual argument corresponding
     to 'x' is an object of class '"track"'.  If there is such an
     element, it can generally be either a function or another methods
     list object.

     In the first case, the function defines the method to use for any
     call in which 'x' is of class '"track"'.  In the second case, the
     new methods list object defines the available methods depending on
     the remaining formal arguments, in this example, 'y'. 

     Each method  corresponds conceptually to a _signature_; that is a
     named list of classes, with names corresponding to some or all of
     the formal arguments.  In the previous example, if selecting class
     '"track"' for 'x', finding that the selection was another methods
     list and then selecting class '"numeric"' for 'y' would produce a
     method associated with the signature 'x = "track", y = "numeric"'.

     You can see the methods arranged by signature by calling the
     function 'showMethods',  A methods list can be converted into an
     ordinary list with the methods arranged this way (in two different
     forms)  by calling the functions 'listFromMlist' and
     'linearizeMlist'.

_S_l_o_t_s:



     '_a_r_g_u_m_e_n_t': Object of class '"name"'.  The name of the argument
          being used for dispatch at this level. 

     '_m_e_t_h_o_d_s': A named list of the methods (and method lists) defined
          _explicitly_ for this argument.  The names are the names of
          classes, and the corresponding element defines the method or
          methods to be used if the corresponding argument has that
          class.  See the details below.

     '_a_l_l_M_e_t_h_o_d_s': A named list,  contains all the directly defined
          methods from the 'methods' slot, plus any inherited methods. 
          Ignored when methods tables are used for dispatch (see
          Methods 

_E_x_t_e_n_d_s:

     Class '"OptionalMethods"', directly.

