CVXR: Disciplined Convex Optimization

An object-oriented modeling language for disciplined convex programming (DCP) as described in Fu, Narasimhan, and Boyd (2020, <doi:10.18637/jss.v094.i14>). It allows the user to formulate convex optimization problems in a natural way following mathematical convention and DCP rules. The system analyzes the problem, verifies its convexity, converts it into a canonical form, and hands it off to an appropriate solver to obtain the solution. This version uses the S7 object system for improved performance and maintainability.

Version: 1.8.1
Depends: R (≥ 4.3.0)
Imports: S7 (≥ 0.2), methods, Matrix (≥ 1.7), Rcpp (≥ 1.1), clarabel (≥ 0.11), cli (≥ 3.6), gmp (≥ 0.7), highs (≥ 1.12), osqp (≥ 1.0), scs (≥ 3.2), slam (≥ 0.1)
LinkingTo: Rcpp, RcppEigen
Suggests: jsonlite (≥ 1.9), knitr, rmarkdown, testthat (≥ 3.3), rlang
Enhances: Rmosek, gurobi (≥ 13.0), Rglpk (≥ 0.6), ECOSolveR (≥ 0.6), Rcplex (≥ 0.3), cccp (≥ 0.3), piqp (≥ 0.6)
Published: 2026-03-06
DOI: 10.32614/CRAN.package.CVXR
Author: Anqi Fu [aut, cre], Balasubramanian Narasimhan [aut], Steven Diamond [aut], John Miller [aut], Stephen Boyd [ctb]
Maintainer: Anqi Fu <anqif at alumni.stanford.edu>
BugReports: https://github.com/cvxgrp/CVXR/issues
License: Apache License 2.0 | file LICENSE
URL: https://cvxr.rbind.io, https://www.cvxgrp.org/CVXR/
NeedsCompilation: yes
Additional_repositories: https://bnaras.r-universe.dev
Citation: CVXR citation info
Materials: README, NEWS
In views: Optimization
CRAN checks: CVXR results [issues need fixing before 2026-03-23]

Documentation:

Reference manual: CVXR.html , CVXR.pdf
Vignettes: Introduction to CVXR (source, R code)
What's New in CVXR 1.8 (source, R code)

Downloads:

Package source: CVXR_1.8.1.tar.gz
Windows binaries: r-devel: CVXR_1.0-15.zip, r-release: CVXR_1.0-15.zip, r-oldrel: CVXR_1.0-15.zip
macOS binaries: r-release (arm64): CVXR_1.0-15.tgz, r-oldrel (arm64): CVXR_1.0-15.tgz, r-release (x86_64): CVXR_1.0-15.tgz, r-oldrel (x86_64): CVXR_1.0-15.tgz
Old sources: CVXR archive

Reverse dependencies:

Reverse depends: tramnet
Reverse imports: ANCOMBC, aramappings, cuadramelo, DebiasInfer, DiSCos, EmpiricalDynamics, filling, fungible, graphicalExtremes, hedgedrf, HonestDiD, kantorovich, MaximinInfer, migest, PlackettLuce, pvEBayes, rclsp, Rdimtools, Riemann, RobustIV, scpi, SIHR, SLSEdesign, spBPS, spStack, wdnet, WRI
Reverse suggests: ccar3, EpiForsk, fairml, glmmrOptim, mlr3fairness, PortfolioAnalytics, portfolioBacktest, starnet, transreg

Linking:

Please use the canonical form https://CRAN.R-project.org/package=CVXR to link to this page.