showMethods             package:methods             R Documentation

_S_h_o_w _a_l_l _t_h_e _m_e_t_h_o_d_s _f_o_r _t_h_e _s_p_e_c_i_f_i_e_d _f_u_n_c_t_i_o_n(_s)

_D_e_s_c_r_i_p_t_i_o_n:

     Show a summary of the methods for one or more generic functions,
     possibly restricted to those involving specified classes.

_U_s_a_g_e:

     showMethods(f = character(), where = topenv(parent.frame()),
                 classes = NULL, includeDefs = FALSE, inherited = TRUE,
                 printTo = stdout())

_A_r_g_u_m_e_n_t_s:

       f: one or more function names.  If omitted, all functions will
          be examined. 

   where: If 'where' is supplied, the methods definition from that
          position will be used; otherwise, the current definition is
          used (which will include inherited methods that have arisen
          so far in the session). If 'f' is omitted, 'where' controls
          where to look for generic functions.

 classes: If argument 'classes' is supplied, it is a vector of class
          names that restricts the displayed results to those methods
          whose signatures include one or more of those classes. 

includeDefs: If 'includeDefs' is 'TRUE', include the definitions of the
          individual methods in the printout. 

inherited: If 'inherits' is 'TRUE', then methods that have been found
          by inheritance, so far in the session, will be included and
          marked as inherited. Note that an inherited method will not
          usually appear until it has been used in this session. See
          'selectMethod' if you want to know what method is dispatched
          for particular classes of arguments.

 printTo: The connection on which the printed information will be
          written.  If 'printTo' is 'FALSE', the output will be
          collected as a character vector and returned as the value of
          the call to 'showMethod'.   See 'show'. 

_D_e_t_a_i_l_s:

     The output style is different from S-Plus in that it does not show
     the database from which the definition comes, but can optionally
     include the method definitions.

_V_a_l_u_e:

     If 'printTo' is 'FALSE', the character vector that would have been
     printed is returned; otherwise the value is the connection or
     filename.

_R_e_f_e_r_e_n_c_e_s:

     The R package 'methods' implements, with a few exceptions, the
     programming interface for classes and methods in the book
     _Programming with Data_ (John M. Chambers, Springer, 1998), in
     particular sections 1.6, 2.7, 2.8, and chapters 7 and 8.

     While the programming interface for the 'methods' package follows
     the reference, the R software is an original implementation, so
     details in the reference that reflect the S4 implementation may
     appear differently in R.  Also, there are extensions to the
     programming interface developed more recently than the reference. 
     For a discussion of details and ongoing development, see the web
     page <URL: http://developer.r-project.org/methodsPackage.html> and
     the pointers from that page.

_S_e_e _A_l_s_o:

     'setMethod', and 'GenericFunctions' for other tools involving
     methods; 'selectMethod' will show you the method dispatched for a
     particular function and signature of classes for the arguments.

_E_x_a_m_p_l_e_s:

     ## Assuming the methods for plot
     ## are set up as in the example of help(setMethod),
     ## print (without definitions) the methods that involve class "track":
     showMethods("plot", classes = "track")
     ## Not run: 
     Function "plot":
     x = ANY, y = track
     x = track, y = missing
     x = track, y = ANY
     ## End(Not run)

