help.start(args, gui=options("gui")[[1]])help.off() help.running() help.search() help.topic(topic) help.keyword(keyword) help.name(name) help.findsum(dirs) help.popup(..., rescan=T)
If you are using an X11 based graphical interface, the environment variable DISPLAY should be set to indicate the name of the machine (and which display and screen on that machine) at which you are sitting. If DISPLAY is not set, args should contain "-display mach:0.0", where "0.0" indicates the display and screen numbers, and "mach" is the name of the machine at which you are sitting.
help.off turns off the help system. The help window system also shuts down when S-PLUS finishes.
help.search sends the current search path to the help system.
help.topic, help.keyword, and help.name allow you to give a topic, keyword (category) or name from an S-PLUS function and have the help window system display information on it. These are equivalent to typing an entry in the "Topic" area, selecting an entry in the "Category" menu, and selecting an entry in the list of functions, respectively. These functions allow programmatic control over the help window system; we don't expect that the casual user will use them directly.
help.findsum creates a help summary file under each directory database specified.
help.popup will make sure that the main help window is brought to the top. The window may be deiconified, if necessary, and help.start may be run if the help system is not already running.
options(gui=xxx)
where "xxx" is "openlook" or "motif".
If you want to use Open Look rather than Motif, we recommend that you put a command to select the graphical interface into your .First function; you may want to put help.start() into your .First also.
Start the help system with the command help.start(). When the main help window pops up, you will see that it has three main parts : a list of "Categories", a list of functions (and datasets) along with short descriptions of each, and an area in which you may type in a topic. If you move the mouse so the cursor is over an entry in the "Categories" menu and click the select button (usually the left mouse button), then a new list of functions will appear in the right part of the help window. This list should include all functions (and datasets) in the current search path in that category. If you press the select button over one of the functions in that list, a new window will pop up, showing the help file for that function. In the upper left corner of the help file window there will be a menu button named "File"; pop up the menu and see that you can print the help file or close that help window. Back in the main window, you will see a type-in area labeled "Topic". You may type in a word there to get a list of functions and datasets with that word in their name or short description. You can then select from that list to see a help file for an entry.
Each time you attach or detach a directory, new help files become available or unavailable so the help system must be notified about this. The attach and detach functions call help.search to take care of this, you should not have to use this function. You may notice that whenever the path changes, the help system will take some time to update its current list of functions and to check to see if a help file you have displayed needs to be updated to show the help file by the same name in the new directory.
When you write a new set of help files (using the prompt function), you should make the help system reflect the new documentation. This allows the help system to use your new help files.
For each directory database on your search path, the help system looks for a help summary file called .Help/.Help.find.sum under the directory containing the S-PLUS objects themselves (a directory database). The file contains information about the help files in the the standard S-PLUS directory databases.
To create a help summary file for your own directory database, use this function with a character vector naming the directory database.
# starting the help systemoptions(gui="motif") help.start() # now the main help window will pop up
# creating your own help file for a function, and making a new # help summary file with information about your new help file in it
myfunc <- function(x) x^2 prompt(myfunc, filename="myfunc.d") !vi myfunc.d !mkdir .Data/.Help !mv myfunc.d .Data/.Help/myfunc help.findsum(".Data")