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 = !includeDefs,
                 showEmpty, printTo = stdout())

_A_r_g_u_m_e_n_t_s:

       f: one or more function names.  If omitted, all functions will
          be shown that match the other arguments. 

   where: Used only when 'f' is missing, or length 0, to determine
          which generic functions to examine.  If 'where' is supplied,
          only the generic functions returned by 'getGenerics(where)'
          are eligible for printing.  If 'where' is also missing, all
          the cached generic functions are considered.

 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: logical indicating if 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.

showEmpty: logical indicating whether methods with no defined methods
          matching the other criteria should be shown at all.  By
          default, 'TRUE' if and only if argument 'f' is not missing.

 printTo: The connection on which the printed information will be
          written; by default, standard output.  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 name and package of the generic are followed by the list of
     signatures for which methods are currently defined, according to
     the criteria determined by the various arguments.  Note that the
     package refers to the source of the generic function.  Individual
     methods for that generic can come from other packages as well.

_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, via 'invisible'.

_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. 
     See 'Methods' and references from there.

_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:

     require(graphics)

     ## 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)

     not.there <- !any("package:stats4" == search())
     if(not.there) library(stats4)
     showMethods(classes = "mle")
     if(not.there) detach("package:stats4")

