listMethods              package:svMisc              R Documentation

_L_i_s_t _a_l_l _m_e_t_h_o_d_s _a_s_s_o_c_i_a_t_e_d _w_i_t_h _a _g_e_n_e_r_i_c _f_u_n_c_t_i_o_n _o_r _a _c_l_a_s_s

_D_e_s_c_r_i_p_t_i_o_n:

     List all S3 and/or S4 methods for a generic function or for a
     class.

_U_s_a_g_e:

     listMethods(f = character(), class = NULL, S3 = TRUE, S4 = TRUE,
             mixed = TRUE, filter = getOption("svGUI.methods"))

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

       f: The name of the generic function (character string), used
          only when 'class = NULL' 

   class: The name of a class 

      S3: If TRUE, list of S3 methods 

      S4: If TRUE, list of S4 methods 

   mixed: If TRUE, S3 and S4 methods are mixed together in a character
          vector, otherwise, S3 and S4 methods are reported separately
          in a list 

  filter: A list of methods to consider when listing class methods.
          Only classes in this list that are defined for the class are
          returned. Store the list of methods you want in the options
          \"svGUI.methods\". The package proposes a reasonable starting
          point on loading if this option is not defined yet. 

_V_a_l_u_e:

     If 'mixed = TRUE', a list with components: 

      S3: The S3 methods for the generic function or the class, or
          'character(0)' if none

      S4: The S4 methods for the generic function or the class, or
          'character(0)' if none

     Otherwise, a character vector with the requested methods

_A_u_t_h_o_r(_s):

     Philippe Grosjean <phgrosjean@sciviews.org>

_S_e_e _A_l_s_o:

     'listTypes', 'addItems'

_E_x_a_m_p_l_e_s:

     ## Generic functions
     listMethods("t.test")               # S3
     listMethods("show", mixed = FALSE)      # S4
     listMethods("ls") # None, not a generic function!

     ## Classes
     # Only the following methods are considered
     getOption("gui.methods")
     listMethods(class = "data.frame")
     listMethods(class = "lm")

