EVOLUTION-MANAGER
Edit File: promptPackage.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 Package</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 promptPackage {utils}"><tr><td>promptPackage {utils}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Generate a Shell for Documentation of a Package</h2> <h3>Description</h3> <p>Generates a shell of documentation for an installed or source package. </p> <h3>Usage</h3> <pre> promptPackage(package, lib.loc = NULL, filename = NULL, name = NULL, final = FALSE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>package</code></td> <td> <p>a <code><a href="../../base/html/character.html">character</a></code> string with the name of an <em>installed</em> or <em>source</em> package to be documented.</p> </td></tr> <tr valign="top"><td><code>lib.loc</code></td> <td> <p>a character vector describing the location of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> library trees to search through, or <code>NULL</code>. The default value of <code>NULL</code> corresponds to all libraries currently known. For a source package this should specify the parent directory of the package's sources.</p> </td></tr> <tr valign="top"><td><code>filename</code></td> <td> <p>usually, a <a href="../../base/html/connections.html">connection</a> 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 <code>name</code> followed by <code>".Rd"</code>. Can also be <code>NA</code> (see below).</p> </td></tr> <tr valign="top"><td><code>name</code></td> <td> <p>a character string specifying the name of the help topic, typically of the form <span class="samp"><pkg>-package</span>.</p> </td></tr> <tr valign="top"><td><code>final</code></td> <td> <p>a logical value indicating whether to attempt to create a usable version of the help topic, rather than just a shell.</p> </td></tr> </table> <h3>Details</h3> <p>Unless <code>filename</code> is <code>NA</code>, a documentation shell for <code>package</code> is written to the file specified by <code>filename</code>, and a message about this is given. </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 <code>final</code> is <code>TRUE</code>, 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 <code>final = TRUE</code> is certainly less work). </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>See Also</h3> <p><code><a href="prompt.html">prompt</a></code>, <code><a href="package.skeleton.html">package.skeleton</a></code> </p> <h3>Examples</h3> <pre> filename <- tempfile() promptPackage("utils", filename = filename) file.show(filename) unlink(filename) </pre> <hr /><div style="text-align: center;">[Package <em>utils</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>