From h.wickham at gmail.com  Tue Jan 29 16:26:24 2008
From: h.wickham at gmail.com (hadley wickham)
Date: Tue, 29 Jan 2008 09:26:24 -0600
Subject: [Rd] A "safe" do.call
In-Reply-To: <alpine.LFD.1.00.0801290525250.23305@gannet.stats.ox.ac.uk>
References: <f8e6ff050801281819l223d85deu458c67fd6e0b3693@mail.gmail.com>
	<f8e6ff050801281830m3a46e884j715611fed13cf3a8@mail.gmail.com>
	<alpine.LFD.1.00.0801290525250.23305@gannet.stats.ox.ac.uk>
Message-ID: <f8e6ff050801290726u6d07dd3fy4a476aa89e958094@mail.gmail.com>

> > Or is this a bug in glm?  It certainly seems that the documentation
> > should mention that ... is passed to glm.control, which only takes
> > three arguments.  I realise that this doesn't come up very often
> > during an interactive model fitting session, and it is easy to remedy
> > when it does, but it makes writing robust functions hard when a
> > function with ... does in fact have a fixed argument list.
>
> I think the docmentation has conflated '...' for glm and '...' for
> weights.
>
> My recollection is that this was intentional: at least one core developer
> used to dislike '...' as it allowed mistyped argument names to be ignored.
> And he has a good point, IMO.

That seems a perfectly good reason not to use ... - but if you are
going to use ... it seems like you shouldn't warn on mismatched
argument names.  Maybe I can attack the problem in the opposite
direction - instead of matching the parameters of the function I'm
calling, I'll try and remove the parameters that probably belong to
ggplot.

Hadley

-- 
http://had.co.nz/



[Rd] A "safe" do.call
hadley wickham