Argument matching is by name first, then the still missing arguments
are filled positionally. Unnamed missing arguments are thus left
missing. Does that help?
Michael
On Fri, Nov 30, 2018 at 8:18 AM Emil Bode wrote:
>
> But the main point is where arguments are mixed together:
>
> > debugonce(plo
But the main point is where arguments are mixed together:
> debugonce(plot.default)
> plot(x=1:10, y=, 'l')
...
Browse[2]> missing(y)
[1] FALSE
Browse[2]> y
[1] "l"
Browse[2]> type
[1] "p"
I think that's what I fall over mostly: that named, empty arguments behave
entirely different from omitting
> Yes, I think all of that is correct. But y _is_ missing in this sense:
> > plot(1:10, y=)
> > ...
> Browse[2]> missing(y)
Although I said what I meant by 'missing' vs 'not present', it wasn't exactly
what missing() means. My bad.
missing() returns TRUE if an argument is not specified in the cal
It looks like you're right that somewhere in (presumably) match.call, the
named, empty arguments are removed, such that the call plot(x=1:10, y=, 10:1)
is translated to plot(x=1:10, 10:1).
But I would have expected it to be the same as plot(x=1:10, , 10:1) (note the
", ,"), which gives an error