Online Documentation

DESCRIPTION:

Shows online documentation. See the DETAILS section below for basic instructions on using the JavaHelp or slynx help viewers.

NOTE: the Java GUI is deprecated in S-PLUS 8.1.

USAGE:

help(name="help", offline=F, call=F, arg, 
     connection=NULL, oldOK=T, text, sig=NULL, 
     browser=options()$help.browser, 
     pager=options()$help.pager, window=help.running(), 
     display=getenv("DISPLAY"), must.find=T) 

OPTIONAL ARGUMENTS:

name
a name or character string specifying a particular function, operator, or other S-PLUS object. If name is not a valid syntactic name, or if it is an S-PLUS reserved word such as if, for, or break, it must be enclosed in quotes. S-PLUS searches the directories in the search list for the appropriate help file and displays it. The default value displays this help file (documentation for the help function).
offline
a logical value. If offline=TRUE, the requested help file is not printed directly to the screen. Instead, if connection is not provided, the requested documentation is run through an appropriate formatter and then to a printer; if connection is given, the requested help is run through a formatter and printed to the specified file or connection object.
call
This argument currently does nothing useful.
arg
In S-PLUS 6 and later, this argument does nothing useful. It is retained for backward compatibility.
connection
a character string naming a file or the name of an S-PLUS connection object. S-PLUS prints the requested help file to the specified file or connection. By default this is NULL, which causes the output to be sent to a printer when offline=TRUE.
oldOK
In S-PLUS 5.1 and later, this argument does nothing useful. It is retained for backward compatibility.
text
a character string specifying alternative help documentation in place of the corresponding self-doc. In this case, the name is used only for heading purposes. This argument is used only for the self-doc mechanism; you should not need to modify its value.
sig
the specific method signature desired. This argument is used only for the self-doc mechanism; you should not need to modify its value.
browser
a character string naming a browser program with which to view the requested help file.
pager
a character string naming a pager program with which to page through the help file. The pager program is passed the name of an HTML file as an argument and should be able to read from that file. By default, options("help.pager") is used as the pager. The default value for the help.pager option is slynx, which is a slightly modified version of the lynx terminal-based HTML browser. slynx is available only as a separate download as part of the pkgutils package: use the install.pkgutils function to install it. If slynx is not on your system then the default pager will be one of commonly available programs lynx, lynx, less, or more. The first two of these can display HTML nicely but won't be able to follow links to other help files. The latter choices will show the raw HTML code. Useful alternatives include pager="slynx -dump -nolist" to print the help text in the same window where S-PLUS is running, and pager="netscape" to print the help text in a Netscape window. If help.running() returns TRUE, the pager argument is ignored for all existing help files.
window
a logical value. If window=TRUE, the requested help file appears in its own window. If the S-PLUS graphical user interface is being used, the window argument is automatically set to TRUE.
display
a character string specifying which X11 server gets the help window. The DISPLAY environment variable is examined by default. If display is specified, the window argument is assumed to be TRUE.
must.find
a logical value. If must.find=TRUE, S-PLUS attempts to return either a real help file or a self-doc file for name. If neither is possible, S-PLUS returns the error message "No documentation for topic name." If must.find=FALSE, S-PLUS returns you to the help browser so that you can search for the desired help file.

SIDE EFFECTS:

If S-PLUS finds documentation on name, the help file is printed. Otherwise a message is printed stating that no documentation is available.

DETAILS:

The default S-PLUS help pager slynx has the following basic commands:

Spacebar move down a page

CTRL-B move up a page

> TAB highlight the next topic

Up-arrow highlight the previous topic

Right-arrow jump to the highlighted topic

Left-arrow return to the previous topic

/xxx highlight next occurrence of xxx

n repeat the last search

q exit help and return to S-PLUS

If S-PLUS is running under the X window system and window=TRUE , the requested help file is displayed in its own window (the HTML browser slynx by default). The window disappears when you exit the help file. Be sure to exit the HTML browser to close the window in the cleanest way possible; killing the window can leave extra processes running.

To launch the JavaHelp help browser, use the help.start function. The JavaHelp browser is an HTML help viewer with an intuitive user interface. The JavaHelp window contains two panes and a toolbar. The left pane has three tabs allowing you to view any of the following: a Table of Contents, an Index of topics, or a Full-Text Search facility. The right pane shows help text. The toolbar contains buttons for the Previous and Next files, and for printing and page setup.

You can copy text in the JavaHelp viewer by highlighting the desired text and pressing CTRL-C. You can paste text into the Commands window that has been copied from JavaHelp by pressing CTRL-V , or by using your usual UNIX paste command.

The prompt function can be used to create help files for your own functions. This returns a skeleton help file for an S-PLUS function. You can then use the HINSTALL and BUILD_JHELP utilities to install your help files and create the help sets that JavaHelp requires. See the chapter "Chapters and Libraries" in the S-PLUS Programmer's Guide.

The offline argument is installation-dependent and must be set up appropriately by the administrator of S-PLUS on each system.

The ? function provides some help features not available with help. In particular, you can see help files for S-PLUS classes using the ? function. See the ? help file for more details.

SEE ALSO:

, , , , , .

EXAMPLES:

# Display this help file.
help() 
# Documentation for the function stem().
help(stem)
# Addition operator and other arithmetic functions. 
help("+")
# Help file for state data sets.
help("state")
# Print state data offline.
help("state", offline = T)
# Help file for plot.
# The file is printed in a separate window if possible.   
help(plot, window = T)