Display the Argument List of a Function

DESCRIPTION:

Displays the argument names and their default expressions for a function.

USAGE:

args(x) 

REQUIRED ARGUMENTS:

x
the name of a function. A character string is also accepted, and is useful when the function name would not be interpreted as a name by the parser.

VALUE:

a copy of x with the body replaced by NULL. Printing this will reveal the names and default expressions of the arguments. Using args offers no advantage over looking at the entire function itself, except in the case of functions with very long bodies.

NOTE:

In previous releases, args operated by printing the USAGE section of the help file for the function.

SEE ALSO:

.

EXAMPLES:

# Arguments for function "persp"
args(persp) 
# Returns the following: 
#  function(x, y, z, xlab = "X", ylab = "Y", zlab = "Z", axes = T,  
#          box = T, eye = NULL, zlim, ar = 1, ...) 
#  NULL 

# Must use character string for special names
args("[")

# Create new "objects" functions with same arguments
objects.new <- args(objects)
# Execute "fix(objects.new)" to edit the new function