Skip to content

ggchangepoint 0.2.0: unified ggcpt API, new engines, hardening - #1

Merged
PursuitOfDataScience merged 1 commit into
masterfrom
release/0.2.0
Jun 20, 2026
Merged

ggchangepoint 0.2.0: unified ggcpt API, new engines, hardening#1
PursuitOfDataScience merged 1 commit into
masterfrom
release/0.2.0

Conversation

@PursuitOfDataScience

Copy link
Copy Markdown
Owner

CRAN-ready 0.2.0 release. Implements the v0.2.0 scope from next_release.md and fixes correctness bugs found while auditing the implementation against the roadmap.

What's in 0.2.0

  • Unified API: ggcpt S3 class; tidy()/glance()/augment()/autoplot() (re-exported); cpt_detect() dispatcher; cpt_penalty().
  • Geoms/stats/theme: geom_changepoint(), geom_cpt_segment(), geom_cpt_ci(), stat_changepoint(), theme_ggcpt(), annotate_segments().
  • New wrappers (optional engines in Suggests, guarded): fpop, gfpop, wbs, wbs2, not, mosum, idetect, tguh.
  • Comparison / evaluation / simulation: ggcpt_compare(), ggcpt_compare_table(), cpt_metrics(), cpt_metrics_annotated(), ggcpt_eval(), cpt_simulate()/rcpt(), signal_*.

Audit fixes (bugs that were actually broken)

  • gfpop_wrapper() reported the series endpoint n as a changepoint.
  • idetect_wrapper() read a non-existent field ($change_points) and never returned anything — now reads $cpt.
  • cpt_simulate() ignored per-segment SDs, so "var"/"meanvar" did not actually change variance.
  • glance() always reported MBIC; now reports the penalty actually used. SegNeigh falls back to SIC (it can't use MBIC upstream).
  • ecp_wrapper() no-change fix; sizelinewidth migration retained.

Packaging / docs

  • Modern "_PACKAGE" idiom; dropped LazyData (no data/) and datasets from Suggests; README.html no longer emitted.
  • Vignettes (introduction, comparison) rewritten for accuracy, with affiliation, complete/correct citations, and Suggests-aware chunks.
  • Added a testthat suite, including regression tests for each fix above.

Check status

R CMD check --as-cran on R 4.4.1: 0 errors / 0 warnings / 0 notes other than environment-only items on the test machine (qpdf, LaTeX, HTML tidy, and network time verification are unavailable here; all present on CRAN).

🤖 Generated with Claude Code

Implements the v0.2.0 scope from the roadmap and fixes correctness bugs
found while auditing the implementation against it.

New infrastructure
- ggcpt S3 result class with print method
- broom-style tidy()/glance()/augment() and ggplot2::autoplot(), all
  re-exported so library(ggchangepoint) is enough to call them
- cpt_detect() dispatcher and cpt_penalty() helper
- geoms/stat: geom_changepoint(), geom_cpt_segment(), geom_cpt_ci(),
  stat_changepoint(); theme_ggcpt(); annotate_segments()
- wrappers: fpop, gfpop, wbs, wbs2, not, mosum, idetect, tguh (optional
  engines guarded via requireNamespace and kept in Suggests)
- ggcpt_compare()/ggcpt_compare_table(); cpt_metrics()/
  cpt_metrics_annotated()/ggcpt_eval(); cpt_simulate()/rcpt() and the
  canonical signal_* test signals

Bug fixes found during the audit
- gfpop_wrapper(): stop reporting the series endpoint n as a changepoint
- idetect_wrapper(): read IDetect::ID()$cpt (was the non-existent
  $change_points, so it never returned a changepoint)
- cpt_simulate(): apply per-segment standard deviations, so "var" and
  "meanvar" actually simulate a variance change
- cpt_detect(): record the penalty actually used (glance() was always
  reporting MBIC); fall back to SIC for SegNeigh, which cannot use MBIC
- ecp_wrapper(): no-change series returns an empty tibble (no spurious
  boundary changepoints / NA)
- ggplot2 size -> linewidth migration with a lifecycle-deprecated alias

Packaging / docs
- modern "_PACKAGE" doc idiom; drop LazyData (no data/); drop datasets
  from Suggests; README.html no longer emitted
- vignettes (introduction, comparison) rewritten for accuracy, with
  affiliation, complete/correct citations, and Suggests-aware chunks
- testthat suite incl. regression tests for the fixes above

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@PursuitOfDataScience
PursuitOfDataScience merged commit 995c432 into master Jun 20, 2026
0 of 5 checks passed
@PursuitOfDataScience
PursuitOfDataScience deleted the release/0.2.0 branch June 20, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant