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.
name of a package, a string
name of a file where to write the generated Rd content, a string. The default should be sufficient in most cases.
If TRUE, create a comment line in the references section
that will cause
The generated skeleton is functionally (almost) equivalent to that
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
todo: At the moment
final=FALSE has the effect
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.
the name of the file (invisibly)
The automatically generated information is that of the installed (or
at least built) package. Usually this is not a problem (and this is
the idea of the function) but it means that if a developer is adding
documentation for previously undocumented functions, they will appear
in the 'Index' section only after the package is installed
again. Similarly, if the description file of the package is changed,
the package needs to be installed again for the changes to appear in
the overview. Since the documentation is installed together with the
package this is no surprise, of course. This may only cause a problem
if documentation is produced with
R CMD Rd2pdf before the
updated version is installed.
This function is not called
repromptXXX since the idea is that
it is called only once and then the Rd file can be edited freely, see
Georgi N. Boshnakov
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.