On Tue, Apr 9, 2013 at 9:15 AM, Harry Mamaysky <h.mamay...@gmail.com> wrote:
> That's true. So perhaps there should be a flag that turns on this error 
> checking. Often "args" is just a list that gets generated automatically and 
> you don't know what all of its elements are. It just leads to a bit of 
> non-deterministic behavior. It would be useful to have the option of flagging 
> when one of those list elements (inadvertently) has the same name as an 
> argument of "what".
>

You can force an error by specifying all the default arguments.  Using
the version of zz with an all component it will encounter all= twice:

> do.call(cbind, c(zz, all = TRUE, fill = NA, suffixes = list(NULL), drop = 
> FALSE))
Error in cbind(deparse.level, ...) :
  formal argument "all" matched by multiple actual arguments

or more compactly:

> do.call(cbind, c(zz, formals(zoo:::cbind.zoo)[-1]))
Error in cbind(deparse.level, ...) :
  formal argument "all" matched by multiple actual arguments


--
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to