If you start looking at various R help files for functions like by
, you can start to notice a curious βargumentβ over and over: ...
You will see that the ellipsis is specified along with all other function arguments.
This is actually the argument itself. It will collect any other arguments that you pass, and pass them to subsequent functions, named later. The documentation usually indicates which function these arguments will pass.
In this case, in ?by
we see the following:
... further arguments to FUN.
This means that any other arguments you pass to by
that do not match those listed will be passed to the function that you pass to FUN
.
Another common instance can be found in plot
, where the documentation lists only two specific arguments: x
and y
. Then there ...
that collects everything else that you go to plot
, and give it to methods or par
to set the parameters of the graphic parameter.
So, in the example @kohske use = "complete.obs"
will be automatically passed to cor
, since it does not match any of the other arguments for by
.
joran source share