nargs
Number of Arguments to Function

Description

nargs Counts the number of arguments that are passed in the current call to the specified function.

Usage

nargs() 
Value
returns the number of actual arguments (including ... arguments) in the call to the function that calls nargs.
References
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.
See Also
missing, args
Examples
nargs()
# [1] NA
myfun <- function(..., a=4) nargs() 
myfun()                 # returns 0 
myfun(1:3,"bear")       # returns 2 
myfun(a=5, 1:3, "bear") # returns 3

Package base version 4.0.0-28
Package Index