What is the args() function in R?

Overview

The args() function in R is used to return the required arguments or parameters of a given function. The args() function takes the name of the function as a parameter value, and returns the parameters that are required by the function.

Syntax

args(name)

Parameter value

The args() function takes a single and required parameter value, name, which represents the name of the function.

Return value

The args() function returns the default values of a function.

Code example

# checking the required arguments to the matrix() function
args(matrix)

Code explanation

In the code written above, we use the args() function to determine the required parameters of the matrix() function.

Free Resources