Skip to main content

1.11) Help


As we’ve seen, each function has a standard help file which is called up by the help() function. These files contain a brief Description of the function’s effect, syntax for its Usage (a list of available argument names, in the default order, with their default values), definitions of the Arguments the function can take, and what sort of output (Value) it produces. They may also give functions to See Also, and some Examples of usage. The examples should always work if you simply paste them into R – well worth trying! You’ll find some of these files more helpful than others, but do persevere!

To search all the available help files for a word or phrase, use help.search(): e.g. help.search("standard deviation"), or ??"standard deviation" for short. It’s surprising how often you can guess the name of a function that does what you want, or hyperlinks in other help files may help you find it.

Find the R functions (e.g. by guessing, or using ??) to get the minimum, maximum and median of a vector of numbers. Take your vector y.exp from the previous question and compare its median with its mean.

Spend some time learning to understand the help files, as they are the definitive guides to each and every function. For more tutorial assistance, several documents are available via the Help menu on the R window toolbar; "An Introduction to R" (available via "Html help" or as a PDF manual) is highly recommended. These, along with other documents contributed by users, are also available from the CRAN web sites.