6  R Function: Help

6.1 Help

  • ?function_name
  • help(function_name)
  • In RStudio, put cursor on the function name and press F1 key

6.2 Help structure

function_name{package_name}

The name of the function including the name of the library that includes the function.

Description

A short summary of what the function does.

Usage

An example of how you would type the function. Each argument of the function will appear in the order R expects you to supply it (if you don’t use argument names).

Arguments

A list of each argument the function takes, what type of information R expects you to supply for the argument, and what the function will do with the information.

Details

A more in-depth description of the function and how it operates. The details section also gives the function author a chance to alert you to anything you might want to know when using the function.

Value

A description of what the function returns when you run it.

References

Published references, if available, related to the function.

See Also

A short list of related R functions.

Examples

Example code that uses the function and is guaranteed to work. The examples section of a help page usually demonstrates a couple different ways to use a function. This helps give you an idea of what the function is capable of.