Dev#2
Open
zaynesember wants to merge 4 commits into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.