| Line 4... |
Line 4... |
| 4 |
\description{
|
4 |
\description{
|
| 5 |
Generates a shell of documentation for the methods of a generic
|
5 |
Generates a shell of documentation for the methods of a generic
|
| 6 |
function.
|
6 |
function.
|
| 7 |
}
|
7 |
}
|
| 8 |
\usage{
|
8 |
\usage{
|
| 9 |
promptMethods(f, filename, methods)
|
9 |
promptMethods(f, filename = NULL, methods)
|
| 10 |
}
|
10 |
}
|
| 11 |
\arguments{
|
11 |
\arguments{
|
| 12 |
\item{f}{ The name of the generic function whose methods are to be
|
12 |
\item{f}{a character string naming the generic function whose methods
|
| 13 |
documented.}
|
13 |
are to be documented.}
|
| 14 |
\item{filename}{ Optional file on which to write the documentation
|
14 |
\item{filename}{usually, a connection or a character string giving the
|
| 15 |
shell. If supplied, it can be the name of a file, a connection, or \code{FALSE}.
|
15 |
name of the file to which the documentation shell should be written.
|
| 16 |
|
- |
|
| 17 |
If \code{FALSE}, the text is returned, presumably to be inserted
|
16 |
The default corresponds to the coded topic name for these methods
|
| 18 |
some other documentation file, such as the documentation of the
|
17 |
(currently, \code{f} followed by \code{"-methods.Rd"}). Can also be
|
| 19 |
generic function itself (see \code{\link{prompt}}).
|
18 |
\code{FALSE} or \code{NA} (see below).}
|
| 20 |
|
- |
|
| 21 |
The default file name is the same as the coded
|
- |
|
| 22 |
topic name for these methods (currently \code{"f-methods.Rd"}.
|
- |
|
| 23 |
}
|
- |
|
| 24 |
\item{methods}{Optional methods list object giving the methods to be
|
19 |
\item{methods}{Optional methods list object giving the methods to be
|
| 25 |
documented. By default, the first methods object for this generic is
|
20 |
documented. By default, the first methods object for this generic
|
| 26 |
used (for example, if the current global environment has some
|
21 |
is used (for example, if the current global environment has some
|
| 27 |
methods for \code{f}, these would be documented).
|
22 |
methods for \code{f}, these would be documented).
|
| 28 |
|
23 |
|
| 29 |
If this argument is supplied, it is likely to be \code{getMethods(f,
|
24 |
If this argument is supplied, it is likely to be
|
| 30 |
where)}, with \code{where} some package containing methods for \code{f}.
|
25 |
\code{getMethods(f, where)}, with \code{where} some package
|
| 31 |
}
|
26 |
containing methods for \code{f}.}
|
| 32 |
}
|
27 |
}
|
| 33 |
\value{
|
28 |
\value{
|
| 34 |
If \code{filename} is \code{FALSE}, the text generated; otherwise, the
|
29 |
If \code{filename} is \code{FALSE}, the text generated;
|
| - |
|
30 |
if \code{filename} is \code{NA}, a list-style representation of the
|
| - |
|
31 |
documentation shell.
|
| - |
|
32 |
Otherwise, the name of the file written to is returned invisibly.
|
| - |
|
33 |
}
|
| - |
|
34 |
\details{
|
| - |
|
35 |
If \code{filename} is \code{FALSE}, the text created is returned,
|
| - |
|
36 |
presumably to be inserted some other documentation file, such as the
|
| - |
|
37 |
documentation of the generic function itself (see
|
| - |
|
38 |
\code{\link{prompt}}).
|
| - |
|
39 |
|
| - |
|
40 |
If \code{filename} is \code{NA}, a list-style representation of the
|
| - |
|
41 |
documentation shell is created and returned. Writing the shell to a
|
| - |
|
42 |
file amounts to \code{cat(unlist(x), file = filename, sep = "\\n")},
|
| - |
|
43 |
where \code{x} is the list-style representation.
|
| - |
|
44 |
|
| - |
|
45 |
Otherwise, the documentation shell is written to the file specified by
|
| 35 |
name of the file written.
|
46 |
\code{filename}.
|
| 36 |
}
|
47 |
}
|
| 37 |
\seealso{
|
48 |
\seealso{
|
| 38 |
\code{\link{prompt}} and
|
49 |
\code{\link{prompt}} and
|
| 39 |
\code{\link{promptClass}}
|
50 |
\code{\link{promptClass}}
|
| 40 |
}
|
51 |
}
|