The prompt function creates a package help file for object. This function should be used to generate help files for new objects or functions being added to an R package.
  • object – An R object, most often a function or a data frame.

Example. A function has been pre-loaded into the R session. The getwd command tells us where the file will be saved. Applying the prompt function creates a help file in the directory shown.
> ls()
[1] "normTail"
> getwd()
[1] "/Users/ddiez/Dropbox/rFunction/code/1202"
> prompt(normTail)
Created file named 'normTail.Rd'.
Edit the file and move it to the appropriate directory.
Tip. See the package.skeleton function for initializing package files, and see the Building Packages tab for videos showing how to build R packages on Mac OS X.

Leave a Reply