What is the help() function in R?

Overview

The help() function in R is used to get help on any given R function passed to it.

Syntax

help(function name)

Parameter value

The help() function takes the parameter value function name which represents the name of any R function.

Return value

The help() function returns access to official documentation pages of the function passed to it.

Example

In the code below, we’ll use the help function to get help on the following R functions:

  • eval() function
  • dump() function
# implementing the help() function
help(eval)

Explanation

In the code above, we use the help() function to provide the official documentation page for the R function eval().

Now, let’s use the help() function to get help on the dump() function. In other words, we use the help() function to provide the official documentation page for the R function dump.

# implementing the help() function
help(dump)

Explanation

In the code above, we use the help() function to provide help on the R function dump() by simply returning the R official documentation page for the dump() function.

Free Resources