args(x)
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.
In previous releases,
args operated by printing the USAGE section of the
help file for the function.
# 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