promptClass(clName, filename = NULL, type = "class", keywords = "classes", where = topenv(parent.frame()), generatorName = clName)
".Rd"
. Can also be
NA
(see below)."classes"
should be one of
them.filename
is NA
, a list-style representation of the
documentation shell. Otherwise, the name of the file written to is
returned invisibly.
In addition, the currently available generics with methods for this
class are found (using getGenerics
). Note that these
methods need not be in the same environment as the class definition; in
particular, this part of the output may depend on which packages are
currently in the search list.
As with other prompt-style functions, unless filename
is
NA
, the documentation shell is written to a file, and a message
about this is given. The file will need editing to give information
about the meaning of the class. The output of
promptClass
can only contain information from the metadata
about the formal definition and how it is used.
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 a generator function is found assigned under the class name or
the optional generatorName
, skeleton documentation for that
function is added to the file.
Chambers, John M. (1998) Programming with Data Springer (For the original S4 version.)
prompt
for documentation of functions,
promptMethods
for documentation of method definitions. For processing of the edited documentation, either use
R CMD Rdconv
,
or include the edited file in the man subdirectory of a
package.
## Not run: > promptClass("track")
# A shell of class documentation has been written to the
# file "track-class.Rd".
# ## End(Not run)
Run the code above in your browser using DataLab