Skip to content

nloptr

2.2.1

R Interface to NLopt

156packages dependsuggested by 30
5.9Mdownloads / year
97.6%test coverage
13/13flavors OK

Overview

About

Solve optimization problems using an R interface to NLopt. NLopt is a free/open-source library for nonlinear optimization, providing a common interface for a number of different free optimization routines available online as well as original implementations of various other algorithms. See https://nlopt.readthedocs.io/en/latest/NLopt_Algorithms/ for more information on the available algorithms. Building from included sources requires 'CMake'. On Linux and 'macOS', if a suitable system build of NLopt (2.7.0 or later) is found, it is used; otherwise, it is built from included sources via 'CMake'. On Windows, NLopt is obtained through 'rwinlib' for 'R <= 4.1.x' or grabbed from the appropriate toolchain for 'R >= 4.2.0'.

Changes in 2.2.1
  • Updates included nlopt sources to v2.10.0 (#194, @astamm).
  • Fix clang-UBSAN memory leak issue (#189, @astamm).
  • Add link to blog post about nloptr v2.2.0.
  • More CI to build against all versions of nlopt>=2.7.0.
  • Use NLOPT_LD_LBFGS in place of NLOPT_LD_LBFGS_NOCEDAL when the latter is

not available (in nlopt v2.9.x).

  • Add checks for x0 and eval_f in nloptr (#191, @astamm).

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 3.2 min · r-devel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-27
  • ERROR12 OK, 1 ERROR2026-06-24
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 2.2.1
READMEYes · 495 wordsVignettesYes · 1 · dynamicNEWSYes · 100% structured · mentions 2.2.1Citation fileYes · software entry onlyWebsiteYes · pkgdown
Help pages
26 (1 internal)includes a package overview page
Examples that run
100%23 run in a plain check
Exported functions with examples
92%
Documented parameters
82%
Return-value docs
96%
Help pages citing references
73%
Vignettes (1)

Downloads

5.9M
CRAN downloads in the past year
Rank #127 · ~16.3K/day · ~495.1K/mo
Daily download trend is not available in this view yet.
445K30 days
1.4M90 days
5.9M1 year
Compare downloads with other packages →
Also on89.1K r2u130 autocran242.6K conda_forge3.3K c2d4u

Repository

117Stars
35Forks
10Open issues
4Open PRs
8Releases
736Commits
15Commit identities
736 commits · Last activity 2025-08-13 · 0% stars, 30d · Default branch at 2.2.1.9000, ahead of CRAN 2.2.1 (checked 2026-10-11) · Discussions: 1 post
Responsiveness
How these are sampled
PRs merged (all time)
69%
Median days to close, 50 most recently updated closed issues
8
Median days to close, 50 most recently updated closed PRs
2

Stars over time

2026-07-14 · 1152026-09-11 · 117
PracticesBeta

13 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/astamm/nloptr on 2026-10-11.

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 (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2025-08-13 · The repository has a site deploy workflow

pkgdown site last built 2025-08-13

Coverage (1)
Coverage reporting (Codecov)
CRAN release process (2)
cran-comments.mdrevdep/
Show all practicesHide 2 practices
Lint, format, editor (3)
AirVS CodeRStudio project
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
4 external dependencies (excludes base and recommended)

Installing nloptr adds no packages beyond those that come with R.

Depends (0)
none
Imports (0)
none
LinkingTo (0)
none
Enhances (0)
none

People & History

People (13)
Contributor, Maintainer since 2.0.0 (2022) · added in 2.0.0
Author
author of the NLopt C library
Contributor · added in 1.2.2
Contributor · added in 1.0.0
Contributor · added in 1.2.2
Contributor · added in 2.0.0
Contributor · added in 1.0.4
Contributor · added in 1.2.2
build process on multiple OS
Contributor · added in 2.2.0
Contributor · added in 2.2.0
Show 2 more contributorsHide 2 contributors
Contributor · added in 2.0.0
Contributor · added in 1.2.2
build process on multiple OS

Previously maintained by Jelmer Ypma (0.8.2 to 1.2.2.3).

Listed in earlier versions (2)
Steven G.
no longer listed · 1.2.2 to 2.2.1
Hans W.
no longer listed · 1.2.2 to 2.2.1
Releases (28)

Pick two releases to compare their code metrics.

Show 29 earlier eventsHide 29 earlier events
  • R
    R 4.0.0 released · 2020-04-24
  • 1.2.2.1
    record
    2020-03-11 · diff ↗
  • 1.2.2
    record
    2020-02-29 · diff ↗ ·
    added 1 export
    ccsaq
  • R
    R 3.6.0 released · 2019-04-26
  • 1.2.1
    record
    2018-10-03 · diff ↗
  • 1.2.0
    record
    2018-09-30 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • 1.0.4
    record
    2017-08-22 · diff ↗ ·
    added 1 export
    nloptr.get.default.options
  • R
    R 3.4.0 released · 2017-04-21
  • R
    R 3.3.0 released · 2016-05-03
  • R
    R 3.2.0 released · 2015-04-16
  • R
    R 3.1.0 released · 2014-04-10
  • 1.0.0
    record
    2014-02-16 · diff ↗ ·
    added 20 exports
    nl.grad, nl.jacobian, nl.opts, slsqp, cobyla, bobyqa, newuoa, direct, directL, neldermead, sbplx, lbfgs, tnewton, mma, varmetric, mlsl, crs2lm, isres, stogo, auglag
  • 0.9.6
    record
    2013-11-19 · diff ↗
  • 0.9.5
    record
    2013-11-13 · diff ↗
  • 0.9.3
    record
    2013-07-31 · diff ↗
  • 0.9.1
    record
    2013-04-29 · diff ↗
  • R
    R 3.0.0 released · 2013-04-03
  • R
    R 2.15.0 released · 2012-03-30
  • 0.8.9
    record
    2011-11-23 · diff ↗
  • 0.8.8
    record
    2011-11-02 · diff ↗
  • R
    R 2.14.0 released · 2011-10-31
  • 0.8.7
    record
    2011-10-27 · diff ↗
  • 0.8.6
    record
    2011-10-24 · diff ↗
  • 0.8.5
    record
    2011-09-05 · diff ↗
  • 0.8.4
    record
    2011-08-13 · diff ↗ ·
    added 1 export
    nloptr.print.options
  • 0.8.3
    record
    2011-07-29 · diff ↗ ·
    added 1 export
    check.derivatives
  • 0.8.2
    record
    2011-06-22
  • R
    R 2.13.0 released · 2011-04-13

Package metadata

First published
2011-06-22
Total releases
28 / 15 yrs
License
LGPL (>= 3) OSI
Download size
2.1 MB

Cite

Cite this package

Run in R for the authors' entry:

citation("nloptr")

The package provides a citation file, so citation() returns the authors' own entry.

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 nloptr version 2.2.1 [Data set]. HJJB, LLC. Data release v2026-10-17. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-17, 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