Get the List of Arguments of a Function in R Programming – args() Function
args() function in R Language is used to get the required arguments by a function. It takes function name as arguments and returns the arguments that are required by that function.
name: Function name
- For a closure: Formal Argument list but with NULL body
- For a Primitive Function: A closure with usage and a NULL body
- For a non-function: NULL in case of not a function.
function (x, values, after = length(x)) NULL function (x) NULL function (..., sep = " ", collapse = NULL) NULL
The above code returns NULL because the names passed to
args() function are not actual functions.