The typical use of ...
argument is when a function say f
internally calls a function g
and uses ...
to pass arguments to g
without explicitly listing all those arguments as its own formal arguments. One may want to do this, for example, when g
has a lot of optional arguments that may or may not be needed by the user in the function f. Then instead of adding all those optional arguments to f
and increasing complexity, one may simply use ...
.
What it means, as you asked, is the function f
will simply ignore these and pass them on to g
. The interesting thing is that ...
may even have arguments that g
does not want and it will ignore them too, for say h
if it needed to use ...
too. But also see this so post for a detailed discussion.
For example consider:
f <- function (x, y, ...) {
# do something with x
# do something with y
g(...) # g will use what it needs
h(...) # h will use that it needs
# do more stuff and exit
}
Also, see here in the intro-R manual for an example using par
.
Also, this post shows how to unpack the ...
if one was writing a function that made use of it.