[R] Announcement of optimr and optimrx packages

ProfJCNash profjcnash at gmail.com
Thu Aug 18 15:35:22 CEST 2016

Package __optimr__ is now on CRAN, and a more capable package
__optimrx__ is on R-forge at


These packages wrap a number of tools for function minimization,
sometimes with bounds constraints or fixed parameters, but use a
consistent interface in function optimr() that matches the base function
optim(). Moreover, the use of the parameter scaling control parscale is
applied to all methods. There are functions to allow multiple methods to
be tried simultaneously via function opm(), which is a replacement for
package optimx that used a different calling syntax. There are
multistart() and polyopt() functions for multiple starts or
polyalgorithm uses.

Some of the approximately twenty available optimizers require derivative
(gradient) information, and the calling syntax uses gradient routine
names in quotation marks to specify which gradient approximations are to
be used. Nevertheless, I strongly recommend analytic gradients where
possible, and welcome any efforts to find user-friendly ways to provide
automatic or symbolic differentiation.

As the main optimr() function is set up to permit new optimizers to be
added, there is a vignette explaining (or trying to!) how to add another
optimizer. Package optimr deliberately uses just a few optimizers to
avoid reverse dependency issues should some optimizers be dropped from
CRAN. Otherwise the usage should be the same. I welcome communications
from those who add optimizers or features. Indeed, as I have now been
retired from teaching for 8 years, it would not be amiss for the
maintainer job to be shared with someone younger. For communications
about extensions of the packages or help with maintenance of this and
related tools, please get in touch off-line to either the email above or
nashjc _at_ uottawa.ca.

Because of the dependency on many other packages, it is likely there
will be glitches from time to time as underlying software is adjusted,
maintained or improved. Often sorting out exactly where the difficulties
arise can be tricky, and I would repeat the R mantra of "short
reproducible example". As always with complicated packages like this,
there will certainly be some ways to get unexpected responses, and I ask
your indulgence and assistance in rendering the packages water-tight.


John Nash

More information about the R-help mailing list