Determine Number of Arguments to Function
count the number of ... arguments passed.
nDotArgs(...)
... |
... arguments or real arguments in the call to the function whcih calls ttnDotArgs. |
the number of ... arguments in the call to the
function which calls nDotArgs
.
myfun <- function(..., a=4) nDotArgs(...) myfun() ## returns 0 myfun(1:3,"bear") ## returns 2 myfun(a=5, 1:3, "bear") ## returns 2 (excludes a)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.