Approximates Univariate Continuous Functions Through Piecewise Linear Regression

Allows users to find a piecewise linear regression approximation to a given continuous univariate function within a specified error tolerance. Methods based on Warwicker and Rebennack (2025) "Efficient continuous piecewise linear regression for linearising univariate non-linear functions" .


pwlapprox2d

pwlapprox2d approximates continuous univariate functions using adaptive piecewise linear regression. It produces a piecewise linear approximation of a function over a specified domain until the desired accuracy is reached.

You can install the package from your local folder during development using:

```r install.packages(“devtools”) devtools::install(“C:/Users/alasd/OneDrive/Documents/R/Packages/pwlapprox2d”)

Reference manual

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

install.packages("pwlapprox2d")

0.1.0 by John Warwicker, 10 months ago


Browse source code at https://github.com/cran/pwlapprox2d


Authors: John Warwicker [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports nloptr

Suggests knitr, rmarkdown


See at CRAN