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.

