Rdpack (version 0.4-20)

promptPackageSexpr: Generates a shell of documentation for an installed package

Description

Generates a shell of documentation for an installed package. The content is similar to `promptPackage' but information that can be computed is produced with Sexpr's so that it is always up to date.

Usage

promptPackageSexpr(package, filename = NULL, final = TRUE, overview = FALSE, bib = TRUE)

Arguments

package
name of a package, a string
filename
name of a file where to write the generated Rd content, a string. The default should be sufficient in most cases.
final
logical; if TRUE the content should be usable without manual editing.
overview
logical; if TRUE creates sections with hints what to put in them, otherwise such sections are written to the file but are commented out.
bib
If TRUE, create a comment line in the references section that will cause rebib to import all references from the default bib file.

Value

the name of the file (invisibly)

Details

The generated skeleton is functionally (almost) equivalent to that produced by promptPackage. The difference is that while promptPackage computes some information and inserts it verbatim in the skeleton, promptPackageSexpr inserts Sexpr's for the computation of the same information at package build time.

In this way there is no need to manually update information like the version of the package. The index of functions (which contains their descriptions) does not need manual updating, as well.

promptPackageSexpr needs to be called only once to create the initial skeleton. Then the Rd file can be edited as needed.

If the Rd file is generated with the option bib = TRUE (or the appropriate lines are added to the refernces section manually) the references can be updated at any time by a call of rebib.

todo: At the moment final=FALSE has the effect described for overview. At the time of writing this (2011-11-18) I do not remember if this is intentional or the corresponding `if' clause contains | by mistake.