promptMethods            package:methods            R Documentation

_G_e_n_e_r_a_t_e _a _S_h_e_l_l _f_o_r _D_o_c_u_m_e_n_t_a_t_i_o_n _o_f _F_o_r_m_a_l _M_e_t_h_o_d_s

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

     Generates a shell of documentation for the methods of a generic
     function.

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

     promptMethods(f, filename = NULL, methods)

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

       f: a character string naming the generic function whose methods
          are to be documented.

filename: usually, a connection or a character string giving the name
          of the file to which the documentation shell should be
          written. The default corresponds to the coded topic name for
          these methods (currently, 'f' followed by '"-methods.Rd"'). 
          Can also be 'FALSE' or 'NA' (see below).

 methods: Optional methods list object giving the methods to be
          documented.  By default, the first methods object for this
          generic is used (for example, if the current global
          environment has some methods for 'f', these would be
          documented).

          If this argument is supplied, it is likely to be
          'getMethods(f, where)', with 'where' some package containing
          methods for 'f'.

_D_e_t_a_i_l_s:

     If 'filename' is 'FALSE', the text created is returned, presumably
     to be inserted some other documentation file, such as the
     documentation of the generic function itself (see 'prompt'). 

     If 'filename' is 'NA', a list-style representation of the
     documentation shell is created and returned.  Writing the shell to
     a file amounts to 'cat(unlist(x), file = filename, sep = "\n")',
     where 'x' is the list-style representation.

     Otherwise, the documentation shell is written to the file
     specified by 'filename'.

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

     If 'filename' is 'FALSE', the text generated; if 'filename' is
     'NA', a list-style representation of the documentation shell.
     Otherwise, the name of the file written to is returned invisibly.

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

     'prompt' and 'promptClass'

