count the number of ... arguments passed.

nDotArgs(...)

Arguments

...

... arguments or real arguments in the call to the function which calls nDotArgs.

Value

the number of ... arguments in the call to the function which calls nDotArgs.

See also

Examples

myfun <- function(..., a=4) nDotArgs(...)
myfun()                 ## returns 0 
#> [1] 0
myfun(1:3,"bear")       ## returns 2 
#> [1] 2
myfun(a=5, 1:3, "bear") ## returns 2 (excludes a)
#> [1] 2