EVOLUTION-MANAGER
Edit File: promptClass.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Generate a Shell for Documentation of a Formal Class</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for promptClass {methods}"><tr><td>promptClass {methods}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Generate a Shell for Documentation of a Formal Class</h2> <h3>Description</h3> <p>Assembles all relevant slot and method information for a class, with minimal markup for Rd processing; no QC facilities at present. </p> <h3>Usage</h3> <pre> promptClass(clName, filename = NULL, type = "class", keywords = "classes", where = topenv(parent.frame()), generatorName = clName) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>clName</code></td> <td> <p>a character string naming the class to be documented.</p> </td></tr> <tr valign="top"><td><code>filename</code></td> <td> <p>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 the topic name for the class documentation, followed by <code>".Rd"</code>. Can also be <code>NA</code> (see below).</p> </td></tr> <tr valign="top"><td><code>type</code></td> <td> <p>the documentation type to be declared in the output file.</p> </td></tr> <tr valign="top"><td><code>keywords</code></td> <td> <p>the keywords to include in the shell of the documentation. The keyword <code>"classes"</code> should be one of them.</p> </td></tr> <tr valign="top"><td><code>where</code></td> <td> <p>where to look for the definition of the class and of methods that use it. </p> </td></tr> <tr valign="top"><td><code>generatorName</code></td> <td> <p>the name for a generator function for this class; only required if a generator function was created <em>and</em> saved under a name different from the class name. </p> </td></tr> </table> <h3>Details</h3> <p>The class definition is found on the search list. Using that definition, information about classes extended and slots is determined. </p> <p>In addition, the currently available generics with methods for this class are found (using <code><a href="GenericFunctions.html">getGenerics</a></code>). 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. </p> <p>As with other prompt-style functions, unless <code>filename</code> is <code>NA</code>, 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 <em>meaning</em> of the class. The output of <code>promptClass</code> can only contain information from the metadata about the formal definition and how it is used. </p> <p>If <code>filename</code> is <code>NA</code>, a list-style representation of the documentation shell is created and returned. Writing the shell to a file amounts to <code>cat(unlist(x), file = filename, sep = "\n")</code>, where <code>x</code> is the list-style representation. </p> <p>If a generator function is found assigned under the class name or the optional <code>generatorName</code>, skeleton documentation for that function is added to the file. </p> <h3>Value</h3> <p>If <code>filename</code> is <code>NA</code>, a list-style representation of the documentation shell. Otherwise, the name of the file written to is returned invisibly. </p> <h3>Author(s)</h3> <p>VJ Carey <a href="mailto:stvjc@channing.harvard.edu">stvjc@channing.harvard.edu</a> and John Chambers </p> <h3>References</h3> <p>Chambers, John M. (2008) <em>Software for Data Analysis: Programming with R</em> Springer. (For the R version.) </p> <p>Chambers, John M. (1998) <em>Programming with Data</em> Springer (For the original S4 version.) </p> <h3>See Also</h3> <p><code><a href="../../utils/html/prompt.html">prompt</a></code> for documentation of functions, <code><a href="promptMethods.html">promptMethods</a></code> for documentation of method definitions. </p> <p>For processing of the edited documentation, either use <code>R CMD <a href="../../base/html/RdUtils.html">Rdconv</a></code>, or include the edited file in the ‘<span class="file">man</span>’ subdirectory of a package. </p> <h3>Examples</h3> <pre> ## Not run: > promptClass("track") A shell of class documentation has been written to the file "track-class.Rd". ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>methods</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>