Skip to content
Prev 15787 / 63461 Next

dealing with empty actual arguments matched by '...' formals

Duncan Murdoch <murdoch@math.aau.dk> writes:
The standard case is indexing, as Tony mentions. 

The whole thing is somewhat tricky because at least some of R's
semantics are deliberately different from S. E.g.
[1] TRUE

Same thing in S gives FALSE. S looks at the call to g whereas R looks
at the value. This works by passing a "magic bullet" which is
implemented as the "empty name", as you can get to see by doing
something like
Error in eval(expr, envir, enclos) : Argument is missing, with no default
[1] "name"
[1] ""

One side effect of R's way of doing things is that a call to
list(i,j,k) with k missing is hard to tell from list(i,j,). However,
list() must be doing that somehow... I'm not sure it is a good thing, but
it may have been necessary for S compatibility.

I think that what Tony was up to might be doable through variations on
the match.call() scheme above.