Learn R Programming

splus2R (version 1.0-3)

nDotArgs: Determine Number of Arguments to Function

Description

count the number of ... arguments passed.

Usage

nDotArgs(...)

Arguments

...
... arguments or real arguments in the call to the function whcih calls tt{nDotArgs}.

Value

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

concept

splus

See Also

nargs.

Examples

Run this code
myfun <- function(..., a=4) nDotArgs(...)
myfun()                 ## returns 0 
myfun(1:3,"bear")       ## returns 2 
myfun(a=5, 1:3, "bear") ## returns 2 (excludes a)

Run the code above in your browser using DataLab