Brought to you by molecularsciences.org.
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.
This publication may not be redistributed without this notice.

R Language Documentation

R organizes documentation in terms of packages and functions. Documentation comes with each package you download and install.

R Package Documentation
All R functions, dataset and other objects are stored in packages. A package's contents, including its documentation, is available only after it is loaded. To see a list of installed R packages type:

> library()

This should produce a list such as follows:


Packages in library 'C:/PROGRA~1/R/rw2011/library':



base        The R Base Package

boot        Bootstrap R (S-Plus) Functions (Canty)

class       Functions for Classification

cluster     Cluster Analysis Extended Rousseeuw et al.

datasets    The R Datasets Package

graphics    The R Graphics Package

...

To load a package, use library("package_name"):

> library(graphics)

To view the documentation of a package, we use library(help="package_name") or help(package="package_name"):

> library(help=graphics)

or

> help(package=graphics)

This should produce a list such a follows:


                Information on package 'graphics'



Description:



Package:       graphics

Version:       2.1.1

Priority:      base

Title:         The R Graphics Package

Maintainer:    R Core Team 

Description:   R functions for base graphics

Depends:       grDevices

License:       GPL Version 2 or later.

Built:         R 2.1.1; ; 2005-06-21 08:25:36; windows



Index:



abline                  Add a Straight Line to a Plot

arrows                  Add Arrows to a Plot

assocplot               Association Plots

...

R Function Documentation
The package documentation list all the functions of a package along with one line descriptions of the functions. A more detailed documentation is also available for each function. To access it, you need to use help(function_name):

> help(arrows)

Navigable Help System
A HTML based help system is also available. To use this you have to type the following command:

> help.start()

The help system is very user-friendly and contains all the information you can access with the help command and more.