Skip to content

Dev#2

Open
zaynesember wants to merge 4 commits into
mainfrom
dev
Open

Dev#2
zaynesember wants to merge 4 commits into
mainfrom
dev

Conversation

@zaynesember

Copy link
Copy Markdown
Owner

No description provided.

zaynesember and others added 4 commits June 28, 2026 20:20
Split the monolithic plotness() into a compute/draw architecture while keeping
the public function fully backward compatible (same signature; plot=TRUE -> a
ggplot, plot=FALSE -> the identical legacy 8-column data frame).

- New exported plotness_fit() returns a `plotness_fit` S3 object carrying the
  plotting data and the fitted estimates, with print(), coef(),
  as.data.frame(), and a ggplot2::autoplot() method (the generic is
  re-exported). Estimates are now reachable via fit$estimates / coef() instead
  of only as on-plot text.
- plotness() becomes a thin facade over plotness_fit() + autoplot().
- Input is validated up front via check_plotness_input() with class-tagged cli
  errors (negative/non-integer counts, count > size for binomial, conf_level
  outside (0, 1), missing values, and degenerate fits); lambda is now ignored
  with a warning for non-Poisson types.
- autoplot() uses a colourblind-safe Okabe-Ito palette mapped by a named vector
  (removing the alphabetical-ordering fragility), grey confidence bars, and the
  fit summary as a subtitle so it can no longer overlap the data.
- Relicense to GPL (>= 2): the per-type metameter statistics are adapted
  verbatim from vcd::distplot() (GPL-2), so MIT was incompatible. Credit the
  upstream vcd authors (Meyer, Zeileis, Hornik, Friendly) in Authors@R.
- Declare cli and rlang in Imports.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Add vdiffr snapshot tests for all three plot types.
- Add plotness_fit() tests: object shape, estimate recovery and coef()
  consistency, the explicit-size nbinomial branch, leveled-lambda numerics, and
  every class-tagged validation error.
- Strengthen the legacy data-frame tests to pin NA placement at zero-frequency
  rows and anchor metameter values (catches row-misalignment regressions).
- Replace the tautological y_line monotonicity check with a value check against
  the fit, and add facade-vs-autoplot equivalence and xlim plot-path tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- GitHub Actions workflows: R-CMD-check (multi-OS/R), test coverage (Codecov),
  and pkgdown deploy.
- pkgdown site config; spelling check (tests/spelling.R + inst/WORDLIST).
- .lintr config (lintr is clean); build-ignore .lintr.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- README: add a "Getting the fitted estimates" section (plotness_fit/coef/
  autoplot), status badges, and the GPL license note.
- NEWS: record the new features, plot changes, behaviour changes (degenerate
  and lambda warnings), and the relicense.
- Vignette: add a programmatic-estimates section and match the new palette.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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