There is a mechanism that allows variability in the arguments given to R functions. Technically it is ellipsis, but more commonly called “…”, dots, dot-dot-dot or three-dots.
The three-dots allows:
- an arbitrary number and variety of arguments
- passing arguments on to other functions
The two prime cases are the
> c function (..., recursive = FALSE) .Primitive("c") > list function (...) .Primitive("list")
Both of these allow you to give them as many arguments as you like, and you can name those arguments (which end up as names in the resulting object). Read more →