Contents
 
Introduction
To R

Help!

R has an online help system. Start it up with the function:
> help.start()
This will either start netscape, or if netscape is already running, start the help system in a netscape window.

Clicking on packages pops up a window with a list of all packages. Click on a package to get a list of all individual functions within that package along with a brief description of each one. Clicking on a function name pops up a window with the documentation for that function. This takes the form of a formatted text page with several sections. Most function help pages will have the first few sections - DESCRIPTION, USAGE, ARGUMENTS and VALUE:

In fact the help page for rnorm() is slightly complicated by the fact that it is interleaved with the help for pnorm(), dnorm() and qnorm(). Often you will find the help for several closely-related functions in the same file.

Other Sections

The help file for a function may also contain other sections giving more detail of the algorithm used, references, some examples of how to use the function, and a list of related functions in a SEE ALSO section.

Quick Help

If you know the name of a function you want help on then you can just type help(function_name) or simply ?function_name. For example:
> ?rnorm
If you have done help.start() then the help file will pop up otherwise it will be shown within your R session or at another window of emacs if running R within it.

Topic searching

You can enter a word in the Search box of the help window Search Engine & Keywords and it will search the function descriptions for that keyword.

Quick Argument Lists

If you've forgotten exactly what arguments a function uses, then the args() function will spit them out for you:
> args(rnorm)
function(n, mean = 0, sd = 1)
NULL
Ignoring the NULL, this quickly tells us the names and defaults of the arguments, which can be very useful. 
Contents