Open hturner opened 1 year ago
Thank you for raising this. I think this needs to be decided on a case-by-case basis. Adding chkDots(...)
essentially precludes (or at least makes it more cumbersome) to have that method called via the NextMethod()
mechanism, because extra arguments from other methods are no longer silently ignored. So one has to weigh the two competing goals. Now, subset.data.frame
is quiet special in that its help clearly says that "This is a convenience function intended for use interactively", so there is no strong NextMethod()
case.
I did wonder, however, whether chkDots()
would be a good candidate for producing a classed warning (#62) such that it can be catched specifically in the event it is expected.
Following up from @bastistician's talk in the kick-off session where he discussed his recent change to
subset.data.frame()
which usedchkDots()
to avoid problems with additional arguments being ignored.I wonder if there are other functions using
...
wherechkDots()
should be added at the beginning. Should this function be called for any function with...
? Or issubset.data.frame()
a special case because of the more likely confusion between an intended subsetting condition (e.g.gear == 4
) and an accidental argument setting (gear = 4
)