prompt {base} | R Documentation |
Facilitate the constructing of files documenting R functions.
prompt(object, ...) prompt.default(object, filename = paste(name, ".Rd", sep = ""), name = NULL, force.function = FALSE, ...) prompt.data.frame(object, filename = paste(name, ".Rd", sep = ""), name = NULL, ...)
object |
an R object, typically a function |
name |
character string specifying the name of the object. |
filename |
name of the output file |
force.function |
treat object as function in any case |
... |
further arguments passed to or from other methods. |
An ASCII file filename
is produced containing the proper
function and argument names of object
. You have to edit it
before adding the documentation to the source tree, i.e., (currently)
to `$R_HOME/src/library/base/man/'.
When prompt
is used in for
loops or scripts, the
explicit name
specification will be useful.
The documentation file produced by prompt.data.frame
does not
have the same format as many of the data frame documentation files in
the base
library. We are trying to settle on a preferred
format for the documentation.
Douglas Bates for prompt.data.frame
help
and the chapter on ``Writing R documentation'' in
``Writing R Extensions'' (see the `doc/manual'
subdirectory of the R source tree).
prompt(plot.default) prompt(interactive, force.function = TRUE) unlink("plot.default.Rd") unlink("interactive.Rd") data(women) # data.frame prompt(women) unlink("women.Rd") data(sunspots) # non-data.frame data prompt(sunspots) unlink("sunspots.Rd")