Skip to content

lbfgsb3c

2026-3.5Package record

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

7packages dependsuggested by 7
77.4Kdownloads / year
84.7%test coverage
13/13flavors OK

Overview

About

Interfacing to Nocedal et al. L-BFGS-B.3.0 (See http://users.iems.northwestern.edu/~nocedal/lbfgsb.html) 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.

Changes in 2026-3.5
  • Added a thread-safe C++ port of the L-BFGS-B 3.0 Fortran code (the Fortran is kept and remains the default). It keeps no shared mutable state and does not call the R API, so independent problems can be solved concurrently (for example as an inner optimizer in an OpenMP loop). The port reproduces the Fortran results exactly. Its workspace is allocated once per thread and reused (zeroed per run), so memory scales with the number of threads, not the number of optimizations.
  • The C++ port is available from C/C++ as lbfgsb3Cts (the second element of .lbfgsb3cPtr(), set up by iniLbfgsb3 in lbfgsb3ptr.h) and from R with lbfgsb3c(..., control = list(engine = "cpp")).
Show all changes in 2026-3.5Hide the rest of the changes in 2026-3.5
  • lbfgsb3C_ no longer stores its $info result in a global R list.
  • lmm is now validated. lbfgsb3c() errors unless it is a whole number >= 1; the C entry points return fail = 29 ("ERROR: INVALID LMM") instead of dividing by zero (lmm <= 0) or overflowing the workspace size (very large lmm). n <= 0 returns fail = 13 before any work arrays are allocated.
  • Nested lbfgsb3c() calls (an objective that runs its own optimization) now work: the R callbacks are kept per call instead of in globals that the inner call overwrote. A gradient of the wrong length is now an error instead of a read past its end.
  • Added src/Makevars (OpenMP for the internal thread-safety test helper, and explicit $(FLIBS)).
  • Removed the unused timer.f (its cpu_time call left an unresolved symbol with flang 21+), and the vignette no longer calls pkgbuild::compile_dll() (it failed when checked outside the source tree).
  • control$reltol is now checked for length one (the check tested abstol instead, so an empty reltol was read out of bounds).

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 3.1 min · r-devel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-04-22
  • ERROR13 OK, 1 ERROR2026-04-18
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 2026-3.5
READMEYes · 81 wordsVignettesYes · 1 · dynamicNEWSYes · 100% structured · mentions 2026-3.5Citation fileNoWebsiteYes · pkgdown
Help pages
2
Examples that run
100%2 run in a plain check
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
50%
Vignettes (1)

Downloads

77.4K
CRAN downloads in the past year
Rank #1,527 · ~212/day · ~6.4K/mo
Daily download trend is not available in this view yet.
5.8K30 days
15.9K90 days
77.4K1 year
Compare downloads with other packages →
Also on1.6K r2u6 autocran22.5K conda_forge120 c2d4u

Repository

2Stars
1Forks
1Open issues
1Open PRs
5Releases
151Commits
5Commit identities
151 commits · Last activity 2026-10-06 · +100% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
36
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-02-17 · 12026-10-07 · 2
PracticesBeta

8 development-tooling and community-health practices detected across 4 families in the upstream repository

Checks run against github.com/nlmixr2/lbfgsb3c on 2026-10-21.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (3)
pkgdown

GitHub Pages site last deployed 2026-10-06 · The repository has a site deploy workflow

pkgdown site last built 2026-10-06

Coverage (1)
Coverage reporting (Codecov)
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-08-27
    Pull request it wrote: opened by a project member
    Commits: at least 1 crediting it in the message
Models named in its commits
  • Claude Opus 51 commit · Aug 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
11 external dependencies (excludes base and recommended)

Installing lbfgsb3c adds 3 packages (2 with compiled code, 2.9 MB of source tarballs). Heaviest: Rcpp 1.8 MB, RcppArmadillo 1.0 MB, numDeriv 74 KB.

Depends (1)
R >= 3.6
Imports (3)
LinkingTo (2)
Enhances (0)
none
Reverse dependencies
7direct
19indirect
Imports 7 · LinkingTo 1
Suggested by 7
Show all 14 packagesHide all 14 packages
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

People & History

People (6)
Author, Maintainer since 2018-2.13 (2018)
Author
Listed in earlier versions (3)
Show 3 peopleHide 3 people
Fidler
no longer listed · 2018-2.13 to 2026-3.5
Morales
no longer listed · 2018-2.13 to 2026-3.5
Nash
no longer listed · 2018-2.13 to 2026-3.5
Releases (10)

Pick two releases to compare their code metrics.

  • 2026-3.5Latest
    record
    2026-10-06 · current release · diff ↗ ·
    listed once in CRAN's queue
    Seen in one reading of CRAN's incoming queue, at 2026-10-06 15:36 UTC, so it stayed less than the time between readings.
  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • 2024-3.5
    record
    2024-09-18 · diff ↗ ·
    added 1 export
    .lbfgsb3cPtr
  • R
    R 4.4.0 released · 2024-04-24
  • 2024-3.4
    record
    2024-04-04 · diff ↗
  • 2024-3.3
    record
    2024-04-01 · diff ↗
  • 2020-3.3
    record
    2023-11-28 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • 2020-3.2
    record
    2020-03-03 · diff ↗
  • 2020-2.3
    record
    2020-02-10 · diff ↗
  • 2019-11.26
    record
    2019-11-30 · diff ↗ ·
    added 3 exports
    lbfgsb3, lbfgsb3f, lbfgsb3x
  • R
    R 3.6.0 released · 2019-04-26
Show 3 earlier eventsHide 3 earlier events
  • 2018-2.13-1
    record
    2018-12-01 · diff ↗
  • 2018-2.13
    record
    2018-10-19
  • R
    R 3.5.0 released · 2018-04-23
Across CRAN, the median accepted release of the past year spent 26 hours in the queue, 90% under 11 days.How queue time is measured

Package metadata

First published
2018-10-19
Total releases
10 / 8 yrs
License
GPL-2 OSI
Minimum R
≥ 3.6
Download size
143 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("lbfgsb3c")
Fidler, M. L., Byrd, R., Morales, J. L., Nash, J. C., Nocedal, J., & Zhu, C. (2026). lbfgsb3c: Limited Memory BFGS Minimizer with Bounds on Parameters with optim() 'C' Interface (Version 2026-3.5) [Computer software]. https://doi.org/10.32614/CRAN.package.lbfgsb3c

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for lbfgsb3c version 2026-3.5 [Data set]. HJJB, LLC. Data release v2026-10-25. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy