next up previous
Next: Data in S Up: Introduction to S Previous: Recording your S Session

On-line Documentation

When in S it is possible to look at documentation for any function by entering help(function-name), where function-name is the name of the function for which you want documentation. For example, you can get information on the plot function by typing:

> help(plot)

The help function call gives the same documentation found in Appendix 1 of Becker, Chambers, and Wilks. The documentation usually includes helpful examples. It is also possible to get a short form of the help file giving just the form of the function and its argument list. For example, to see the abbreviated help file for the `boxplot' command:

> args(boxplot)

S also has a help browser, which you can start up by issuing the command

> help.start()

The `help.start()' function opens a help window, called a browser. The browser is very useful because it allows you to look at lists of commands by topic area, such as graphics, and then select the ones of interest. For example, suppose that you would like to generate random numbers, but can't recall the name of the function you wish to use. Looking down the right-hand panel of the browswer (labeled `Categories'), we see there is a category called

`Probability Distributions and Random Numbers'

Click on it; the left-hand panel will display all the functions in this category. You can then select functions from the left panel by clicking on them, another window containing the help file will open. You can close a help window by pulling down the file menu and selecting `close'.


Albyn Jones
Tue Jun 25 11:03:47 PDT 1996