promptPackage             package:utils             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 _a _P_a_c_k_a_g_e

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

     Generates a shell of documentation for an installed or source
     package.

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

     promptPackage(package, lib.loc = NULL, filename = NULL,
                   name = NULL, final = FALSE)

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

 package: the name of an _installed_ or _source_ package to be
          documented.

 lib.loc: a character vector describing the location of R library trees
          to search through, or 'NULL'.  The default value of 'NULL'
          corresponds to all libraries currently known.  For a source
          package this should specify the parent directory of the
          package's sources.

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 a file whose name is
          'name' followed by '".Rd"'.  Can also be 'NA' (see below).

    name: a character string specifying the name of the help topic,
          typically of the form '<pkg>-package'.

   final: a logical value indicating whether to attempt to create a
          usable version of the help topic, rather than just a shell.

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

     Unless 'filename' is 'NA', a documentation shell for 'package' is
     written to the file specified by 'filename', and a message about
     this is given.  

     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.

     If 'final' is 'TRUE', the generated documentation will not include
     the place-holder slots for manual editing, it will be usable
     as-is.  In most cases a manually edited file is preferable (but
     'final = TRUE' is certainly less work).

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

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

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

     'prompt'

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

     filename <- tempfile()
     promptPackage("utils", filename = filename)
     file.show(filename)
     unlink(filename)

