args

0th

Percentile

Argument List of a Function

Displays the argument names and corresponding default values of a function or primitive.

Keywords
documentation
Usage
args(name)
Arguments
name
a function (a closure or a primitive). If name is a character string then the function with that name is found and used.
Details

This function is mainly used interactively to print the argument list of a function. For programming, consider using formals instead.

Value

For a closure, a closure with identical formal argument list but an empty (NULL) body.For a primitive, a closure with the documented usage and NULL body. Note that some primitives do not make use of named arguments and match by position rather than name.NULL in case of a non-function.

References

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.

See Also

formals, help.

Aliases
  • args
Examples
library(base) args(c) args(graphics::plot.default)
Documentation reproduced from package base, version 3.2.0, License: Part of R 3.2.0

Community examples

dah512@me.com at Oct 24, 2017 base v3.4.1

dah512@me.com at Oct 24, 2017 base v3.4.1

richie@datacamp.com at Jan 17, 2017 base v3.3.2

Anything that isn't a function or a single string returns `NULL`. ```{r} args(1:10) args(call("mean", 1:10)) args(c("scan", "plot.default")) ```