Skip to content

Quadratic Programming Solver using the 'OSQP' Library

21packages dependsuggested by 7
185.4Kdownloads / year
78.5%test coverage
13/13flavors OK

Overview

About

Provides bindings to the 'OSQP' solver. The 'OSQP' solver is a numerical optimization package for solving convex quadratic programs written in 'C' and based on the alternating direction method of multipliers. See doi:10.48550/arXiv.1711.08013 for details.

Changes in 1.0.0

Breaking changes

  • Replaced R6 with S7 classes. Model methods are now accessed via @ (e.g., model@Solve()) instead of $.
  • Renamed settings to match OSQP 1.0: warm_start -> warm_starting, polish -> polishing. The old names are accepted with deprecation warnings.

New features

  • Upgraded OSQP C library from 0.6.3 to 1.0.0.
  • Added WarmStart() and ColdStart() methods for primal/dual warm starting.
  • New OSQP 1.0 settings: rho_is_vec, check_dualgap, cg_max_iter, cg_tol_reduction, cg_tol_fraction, cg_precond, profiler_level.
Show all changes in 1.0.0Hide the rest of the changes in 1.0.0
  • New solver info fields: dual_obj_val, duality_gap.

Other changes

  • Added vignette with examples for lasso regression, portfolio optimization, and warm starting.
  • User-facing messages now use the cli package.
  • Vendored QDLDL v0.1.8 for CRAN compatibility.
  • OSQP C library printing now uses Rprintf instead of printf.
  • Declared GNU make in SystemRequirements.
  • R CMD check passes with Status: OK.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 4.5 min · r-oldrel-macos-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • WARNING12 OK, 1 WARNING2026-06-08
  • OK12 OK2026-04-25
Show 3 earlier changesHide 3 earlier changes
  • WARNING11 OK, 2 NOTE, 1 WARNING2026-04-22
  • ERROR10 OK, 2 NOTE, 1 WARNING, 1 ERROR2026-04-18
  • WARNING11 OK, 2 NOTE, 1 WARNING2026-03-10
Advisories

none known

Documentation

In release 1.0.0
READMEYes · 113 wordsVignettesYes · 1 · dynamicNEWSYes · 100% structured · mentions 1.0.0Citation fileNoWebsiteYes
Help pages
4 (1 internal)
Examples that run
100%2 run in a plain check
Exported functions with examples
67%
Documented parameters
42%
Return-value docs
67%
Help pages citing references
25%

Downloads

185.4K
CRAN downloads in the past year
Rank #989 · ~508/day · ~15.4K/mo
Daily download trend is not available in this view yet.
15K30 days
40.4K90 days
185.4K1 year
Compare downloads with other packages →
Also on3.4K r2u6 autocran48.6K conda_forge174 c2d4u

Repository

osqp/osqp-r ↗Organization: osqp
16Stars
9Forks
6Open issues
0Open PRs
6Releases
228Commits
4Commit identities
convex-optimizationquadratic-programmingadmmoperator-splittinglassomachine-learningr
License file reads as Apache-2.0 · 228 commits · Last activity 2026-02-28 · 0% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
88%
Median days to close, 50 most recently updated closed issues
20
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-06-13 · 132026-07-07 · 16
PracticesBeta

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

Checks run against github.com/osqp/osqp-r on 2026-10-11.

Continuous integration (3)
GitHub ActionsR CMD check workflowAppVeyor

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

Docs source (1)
pkgdown
CRAN release process (1)
cran-comments.md
Git structural (2)
.gitattributesSubmodules
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-02-16
    Named in .Rbuildignore: .claude
    Named in .gitignore: .claude
    Commits: at least 3 crediting it in the message
Models named in its commits
  • Claude Opus 4.63 commits · Feb 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
8 external dependencies (excludes base and recommended)

Installing osqp adds 3 packages (3 with compiled code, 2.6 MB of source tarballs). Heaviest: Rcpp 1.8 MB, cli 629 KB, S7 180 KB.

Depends (0)
none
Imports (5)
RcppmethodsMatrixS7cli
LinkingTo (1)
Enhances (0)
none
Reverse dependencies
21direct
65indirect
Depends 2 · Imports 19
Suggested by 7
Show all 28 packagesHide all 28 packages
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

People & History

People (7)
Maintainer since 0.6.0.6 (2022), Author · added in 0.6.0.6
Author, Contributor, Copyright holder
Author, Contributor · added in 0.6.0.4
Author, Contributor, Copyright holder
Author, Contributor, Copyright holder
Author, Contributor, Copyright holder
Contributor

Previously maintained by Vineet Bansal (0.6.0.4 to 0.6.0.5) and Paul Goulart (0.6.0.2 to 0.6.0.3).

Releases (18)

Pick two releases to compare their code metrics.

Show 11 earlier eventsHide 11 earlier events

Package metadata

First published
2018-07-01
Total releases
18 / 8 yrs
License
Apache License 2.0 | file LICENSE OSI
Copyright
See COPYRIGHT in the package
Download size
446 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("osqp")
Narasimhan, B., Anderson, E., Banjac, G., Bansal, V., Boyd, S., Goulart, P., & Stellato, B. (2026). osqp: Quadratic Programming Solver using the 'OSQP' Library (Version 1.0.0) [Computer software]. https://doi.org/10.32614/CRAN.package.osqp

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

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