Constrained Optimization on Linear Function

Performs least squares constrained optimization on a linear objective function. It contains a number of algorithms to choose from and offers a formula syntax similar to lm().

Released Version

CRAN version

Build Status

Travis-CI Build Status


A package to perform a least squares constrained optimization on a linear objective function. It provides a very easy way to run a constrained linear regression using the lm formula syntax that most R users are familiar with.


To install the latest released version from CRAN you just need to run on your console:


To install the development version you need to have the devtools package installed. To install devtools type in your console: install.packages('devtools').

Then to install colf run the following on your console:



By typing on your console:

colf_nls(mpg ~ ., mtcars, upper = rep(2, 11), lower = rep(-0.5, 11))

you can see a first example of how to run a constrained optimization on a linear objective function!

Links - Cran / Tutorial / Examples

To read the tutorial and documentation for colf please see the vignette.

To see the released version you can visit CRAN.


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.1.3 by Theo Boutaris, 5 months ago

Report a bug at

Browse source code at

Authors: Theo Boutaris [aut, cre, cph]

Documentation:   PDF Manual  

Task views: Optimization and Mathematical Programming

MIT + file LICENSE license

Depends on nlsr, stats, utils

Suggests testthat, knitr, rmarkdown

See at CRAN