Limited Memory BFGS Minimizer with Bounds on Parameters with optim() 'C' Interface

Interfacing to Nocedal et al. L-BFGS-B.3.0 (See <>) limited memory BFGS minimizer with bounds on parameters. This is a fork of 'lbfgsb3'. This registers a 'R' compatible 'C' interface to L-BFGS-B.3.0 that uses the same function types and optimization as the optim() function (see writing 'R' extensions and source for details). This package also adds more stopping criteria as well as allowing the adjustment of more tolerances.

Travis-CI Build Status AppVeyor Build Status This is the fork of the libfgsb3 from cran with the following differences:

  • The return type has changed is is very similar to what optim returns
  • Allows a direct C/C++ interface through a R registered function, similar to C interface to optim with 2 additional arguments.
  • Allows adjustment of tolerances for minimization success.
  • Added xtolAtol and xtolRtol minimization success criterion.
  • Added maxit termination


To do

2015-01-20 o Fixup line longer than 72 chars in lbfgsb.f. Undeclared integer itask in errclb subroutine. Thanks to Berend Hasselman.

New package lbfgsb3 2014.7.31

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


2020-3.2 by Matthew L Fidler, 2 years ago

Browse source code at

Authors: Matthew L Fidler [aut, cre] , John C Nash [aut] , Ciyou Zhu [aut] , Richard Byrd [aut] , Jorge Nocedal [aut] , Jose Luis Morales [aut]

Documentation:   PDF Manual  

Task views: Optimization and Mathematical Programming

GPL-2 license

Imports Rcpp, numDeriv, methods

Suggests optimx, microbenchmark, testthat, knitr, pkgbuild, rmarkdown, RcppArmadillo

Linking to Rcpp, RcppArmadillo

Imported by glinvci, nlmixr.

Suggested by ROI.plugin.optimx, blackbox, optimParallel, optimx, psqn.

See at CRAN