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.
args(name)
The args() function takes a single and required parameter value, name, which represents the name of the function.
The args() function returns the default values of a function.
# checking the required arguments to the matrix() functionargs(matrix)
In the code written above, we use the args() function to determine the required parameters of the matrix() function.