Fix ppc-distribution docs for argument usage & correct test function (#366)#424
Open
utkarshpawade wants to merge 2 commits intostan-dev:masterfrom
Open
Fix ppc-distribution docs for argument usage & correct test function (#366)#424utkarshpawade wants to merge 2 commits intostan-dev:masterfrom
utkarshpawade wants to merge 2 commits intostan-dev:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR attempts to fix documentation and testing issues in the bayesplot package related to PPC distribution functions. The PR correctly identifies and fixes a test bug, and correctly updates the freq parameter documentation. However, it introduces critical inaccuracies in the documentation for binwidth, bins, and breaks parameters.
Changes:
- Fixed test function that incorrectly used
ppc_dens()instead ofppd_dens()for PPD function testing - Updated
freqparameter documentation to clarify it applies to frequency polygons in addition to histograms - Attempted to update
binwidth,bins, andbreaksparameter documentation (but with inaccuracies)
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/testthat/test-ppc-distributions.R | Correctly fixes test to use ppd_dens() instead of ppc_dens() when testing PPD versions |
| man-roxygen/args-hist-freq.R | Correctly updates freq parameter documentation to include frequency polygons |
| man-roxygen/args-hist.R | Attempts to document binwidth, bins, breaks for multiple geoms, but contains critical inaccuracies |
| man/*.Rd | Regenerated documentation files reflecting the changes in the templates |
| NEWS.md | Documents the changes made in this PR |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Address Copilot review feedback: - bins parameter now only mentions geom_histogram() and geom_area() - breaks parameter now only mentions geom_histogram() - Removed incorrect references to stat_dots() which doesn't support bins/breaks
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.
Fixes #366
This PR addresses the documentation and testing issues in ppc-distribution:
Documentation improvements:
binwidth,bins, andbreaksarguments are passed toggplot2::geom_area()andggdist::stat_dots()in addition toggplot2::geom_histogram()freqargument applies to frequency polygons in addition to histogramsTest fix:
test-ppc-distributions.Rthat incorrectly usedppc_dens()instead ofppd_dens()when testing PPD versions of functionsTesting:
test-ppc-distributions.Rpass (111 PASS | 0 FAIL)