MethodSupport            package:methods            R Documentation

_A_d_d_i_t_i_o_n_a_l (_S_u_p_p_o_r_t) _F_u_n_c_t_i_o_n_s _f_o_r _M_e_t_h_o_d_s

_D_e_s_c_r_i_p_t_i_o_n:

     These are support routines for computations on formal methods.

_U_s_a_g_e:

     getMethodsForDispatch(f)

     cacheMethod(f, sig, def, args = names(sig))

     hasMethod(f, signature=character())

     resetGeneric(f)

_S_u_m_m_a_r_y _o_f _F_u_n_c_t_i_o_n_s:

     `_h_a_s_M_e_t_h_o_d': returns `TRUE' if `f' is the name of a generic
          function with an (explicit) method for this signature.

     `_r_e_s_e_t_G_e_n_e_r_i_c': reset the currently defined methods for this
          generic by removing the corresponding definition from the
          methods metadata (to be remerged when the function is next
          called).  Returns `TRUE' or `FALSE' according to whether
          information for the function was found in the metadata.

          You must call this function when you change relevant
          inheritance information during a session, to guarantee that
          the new information is used if this generic has already been
          called.

     `_c_a_c_h_e_M_e_t_h_o_d': Store the definition for this function and
          signature in the method metadata for the function.  Used to
          store extensions of coerce methods found through inheritance.

          No persistent effect, since the method metadata is
          session-scope only.

     `_g_e_t_M_e_t_h_o_d_s_F_o_r_D_i_s_p_a_t_c_h': Get the current methods list object
          representing the methods for function `f', merged from the
          various packages and with any additional caching information
          stored in the `allMethods' slot.

          If methods have not yet been merged, calling
          `getMethodsForDispatch' will cause the merge to take place.

