Skip to content

nlsic

1.2.0Package record

Non Linear Least Squares with Inequality Constraints

2packages depend
4.5Kdownloads / year
44.2%test coverage
13/13flavors OK

Overview

About

We solve non linear least squares problems with optional equality and/or inequality constraints. Non linear iterations are globalized with back-tracking method. Linear problems are solved by dense QR decomposition from 'LAPACK' which can limit the size of treated problems. On the other side, we avoid condition number degradation which happens in classical quadratic programming approach. Inequality constraints treatment on each non linear iteration is based on 'NNLS' method (by Lawson and Hanson). We provide an original function 'lsi_ln' for solving linear least squares problem with inequality constraints in least norm sens. Thus if Jacobian of the problem is rank deficient a solution still can be provided. However, truncation errors are probable in this case. Equality constraints are treated by using a basis of Null-space. User defined function calculating residuals must return a list having residual vector (not their squared sum) and Jacobian. If Jacobian is not in the returned list, package 'numDeriv' is used to calculated finite difference version of Jacobian. The 'NLSIC' method was fist published in Sokol et al. (2012) doi:10.1093/bioinformatics/btr716.

Changes in 1.2.0
  • nlsic(): added reuse of jacobian in non linear iterations
  • con$reuse_jac=TRUE (do it by default)
  • con$max_reuse=5L (default maximal number of jacobian reuses)
  • nlsic(): con$btfrac default value is brought to 0.8 instead of 0.5.
  • lsi() and lsi_ln() return x with aqr attribute containing QR decomposition of matrix a. This is used to spare some calculations in non linear iterations

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 1.1 min · r-oldrel-macos-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.2.0
READMENoVignettesNoNEWSYes · 100% structured · mentions 1.2.0Citation fileNoWebsitenot declared in DESCRIPTION
Help pages
16
Examples that run
100%5 run in a plain check
Exported functions with examples
33%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
0%

Downloads

4.5K
CRAN downloads in the past year
Rank #12,797 · ~12/day · ~373/mo
Daily download trend is not available in this view yet.
33230 days
88290 days
4.5K1 year
Compare downloads with other packages →
Also on118 r2u4 autocran1.4K conda_forge87 c2d4u

Repository

1Stars
0Forks
0Open issues
0Open PRs
0Releases
10Commits
1Commit identities
10 commits · Last activity 2026-01-27
Responsiveness
How these are sampled
PRs merged (all time)
not measured
Median days to close, 50 most recently updated closed issues
8
Median days to close, 50 most recently updated closed PRs
not measured

Stars over time

2023-07-06 · 12026-07-07 · 1
PracticesBeta

1 development-tooling and community-health practice detected across 1 family in the upstream repository

Checks run against github.com/mathscell/nlsic on 2026-10-22.

Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
6 external dependencies (excludes base and recommended)

Installing nlsic adds 3 packages (2 with compiled code, 143 KB of source tarballs). Heaviest: glue 127 KB, nnls 11 KB, dotty 4.5 KB.

Depends (3)
Imports (0)
none
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
2direct
0indirect
Depends 1 · Imports 1
Depends, Imports or LinkingTo, most downloaded first

People & History

People (1)
Author, Maintainer since 1.0.1 (2022)
Releases (6)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 1.2.0Latest
    record
    2026-01-28 · current release · diff ↗ ·
    added 1 export
    g
  • 1.1.1
    record
    2025-06-27 · diff ↗
  • 1.1.0
    record
    2025-05-16 · diff ↗ ·
    added 1 export
    pnull
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • 1.0.4
    record
    2023-06-26 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • 1.0.2
    record
    2022-04-12 · diff ↗
  • 1.0.1
    record
    2022-01-11
  • R
    R 4.1.0 released · 2021-05-18

Package metadata

First published
2022-01-11
Total releases
6 / 4 yrs
License
GPL-2 OSI
Download size
25 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("nlsic")
Sokol, S. (2026). nlsic: Non Linear Least Squares with Inequality Constraints (Version 1.2.0) [Computer software]. https://doi.org/10.32614/CRAN.package.nlsic

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

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