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.

