From maechler at stat.math.ethz.ch  Sat Apr  5 16:45:14 2008
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Sat, 5 Apr 2008 16:45:14 +0200
Subject: [Rd] suggested minor patch for optim.R
In-Reply-To: <47F6B4E0.40902@zoo.ufl.edu>
References: <47F6B4E0.40902@zoo.ufl.edu>
Message-ID: <18423.36986.39737.812584@cmath-5.math.ethz.ch>

Hi Ben,

>>>>> "BB" == Ben Bolker <bolker at zoo.ufl.edu>
>>>>>     on Fri, 04 Apr 2008 19:08:16 -0400 writes:

    BB>     optim ignores misspelled control parameters, so that
    BB> trying to set (e.g.) "maxint=1000" in the control
    BB> argument silently does nothing.  The patch below (watch
    BB> out for line breaks! also posted at
    BB> http://www.zoo.ufl.edu/bolker/optim_patch.R , and
    BB> http://www.zoo.ufl.edu/bolker/optim_new.R) adds three
    BB> lines to optim.R that issue a warning if any names of
    BB> elements of "control" fail to match the internal object
    BB> that contains the defaults.

such a small change makes a lot of sense to me.


    BB>    Here is code that shows the behavior:

[........]

    BB>    I realize this is probably too late for feature
    BB> freeze for 2.7.0 (?), but I'd appreciate any comments
    BB> ...

I'd say this is a bug fix and not a new feature, so there's
plenty of time for 2.7.0.

I'm about to commit it (i.e. a slightly more compact version).

Thank you, Ben!

Martin Maechler, ETH Zurich



[Rd] suggested minor patch for optim.R
Martin Maechler