Detection of Multiple Changes in Slope in Univariate Time-Series
Overview
Detects multiple changes in slope using the CPOP dynamic programming approach of Fearnhead, Maidstone, and Letchford (2019) doi:10.1080/10618600.2018.1512868. This method finds the best continuous piecewise linear fit to data under a criterion that measures fit to data using the residual sum of squares, but penalizes complexity based on an L0 penalty on changes in slope. Further information regarding the use of this package with detailed examples can be found in Fearnhead and Grose (2024) doi:10.18637/jss.v109.i07.
- Added post processing methods for cpop.crops results
- Removed use of max_iterations in call to crops in cpop.crops method
- Made compatible with the atest version 1.0.5 of crops
From NEWS.md in the release
Install
Health
- OK13 OK2026-10-17
- NOTE12 OK, 1 NOTE2026-10-15
- WARNING9 OK, 2 NOTE, 2 WARNING2026-10-13
- NOTE12 OK, 1 NOTE2026-07-11
- OK13 OK2026-06-09
Show 4 earlier changesHide 4 earlier changes
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-04-22
- ERROR13 OK, 1 ERROR2026-04-18
- OK14 OK2026-03-10
Documentation
- Help pages
- 17
- Examples that run
- 73%11 run in a plain check · 2 only when donttest examples are enabled (R CMD check --as-cran) · 2 hold no code
- Exported functions with examples
- 100%
- Documented parameters
- 77%
- Return-value docs
- 100%
- Help pages citing references
- 76% with a bibliography file
Downloads
Dependencies
Installing cpop adds 112 packages (53 with compiled code, 75 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, data.table 5.7 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 1.0.10Latest
- 1.0.92026-05-29 · diff ↗
- RR 4.6.0 released · 2026-04-24
- 1.0.82025-06-11 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 1.0.72024-05-29 · diff ↗
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 1.0.62022-11-21 · diff ↗
- 1.0.42022-11-11 · diff ↗
- 1.0.3
- RR 4.2.0 released · 2022-04-22
- 1.0.02022-03-11
- RR 4.1.0 released · 2021-05-18
Package metadata
- First published
- 2022-03-11
- Total releases
- 8 / 4 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 4.1.0
- Bundled data
- 8.5 KB / 1 file
- Download size
- 86 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("cpop")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.18637/jss.v109.i07.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.