prompt(object, filename=<<see below>>)
You will need to fill in the actual information about the arguments, a description of the value returned by the function, examples, and whatever other information is appropriate. Lines in the file that contain "~" should be replaced with appropriate information. Arguments that must be specified in the name=value form should have an equal sign (=) added after name on the .AG name line.
To add a section such as "WARNING" make a line beginning with ".SH" (for example, ".SH WARNING") and put the information on subsequent lines. A line consisting of ".ul" italicizes the next line.
The correct order of sections for help files created with prompt.default is as follows: Title, Description, Usage, Required Arguments, Optional Arguments, ".GR" (graphics parameters), Value, Side Effects, Warning, Details, Background, References, See Also, Examples, Keywords. The "Note" section, if it appears, may be anywhere between Side Effects and References.
The correct order of sections for help files created with prompt.data.frame is as follows: Title, Summary, Data Description, Source, Note, Warning, See Also, Examples.
Be sure to leave the line .WR at the end of file; this wraps things up neatly. If you see the message trap botch, it is probably from a help file without a .WR.
For a full description of the formatting macros available in help files, see the section Documenting Your Module in the chapter Developing New Modules in the S-PLUS Programmer's Manual.
Documentation for functions and data resides (as ordinary text files) in a subdirectory called .Help under the directory containing the S-PLUS objects themselves. For example, if you are documenting a function myfun in the directory /usr/me/.Data, the completed documentation file should be moved into the .Help directory with the command mv myfun.d /usr/me/.Data/.Help/myfun To see more about how documentation files are organized, look at some examples. Documentation files for functions are in the directories $SHOME/s/.Functions/.Help, $SHOME/stat/.Functions/.Help and $SHOME/splus/.Functions/.Help where $SHOME is the S-PLUS home directory. Type !echo $SHOME/s/.Functions/.Help from inside S-PLUS to see where this is on your machine.
Keywords define the categories in the help window and in the index by category in the S-PLUS Reference Manual. The keywords and their titles are: sysdata - All Datasets aplot - Add to Existing Plot category - Categorical Data character - Character Data Operations cluster - Clustering complex - Complex Numbers dplot - Computations Related to Plotting attribute - Data Attributes data - Data Directories manip - Data Manipulation classes - Data Types design - Designed Experiments documentation - Documentation dynamic - Dynamic Graphics error - Error Handling device - Graphical Devices hplot - High-Level Plots file - Input/Output--Files iplot - Interacting with Plots interface - Interfaces to Other Languages algebra - Linear Algebra list - Lists loess - Loess Objects logic - Logical Operators iteration - Looping and Iteration math - Mathematical Operations array - Matrices and Arrays methods - Methods and Generic Functions misc - Miscellaneous multivariate - Multivariate Techniques nonlinear - Non-linear Regression nonparametric - Nonparametric Statistics optimize - Optimization print - Printing distribution - Probability Distributions and Random Numbers programming - Programming regression - Regression tree - Regression and Classification Trees robust - Robust/Resistant Techniques smooth - Smoothing Operations environment - S-PLUS Session Environment htest - Statistical Inference models - Statistical Models survival - Survival Analysis ts - Time Series utilities - Utilities
You can find more information in the chapter Enhancing S-PLUS of the S-PLUS Installation and Maintenance Manual in the sections entitled Adding Help Files for New Functions and Modifying S-PLUS Keywords.
help, help.start, Question.mark.
prompt("mygrep") # construct mygrep.d file !vi mygrep.d # fix up the documentation !mkdir .Data/.Help # if necessary, construct subdirectory !mv mygrep.d .Data/.Help/mygrep # install