Skip to content

fix: round collect_n_subject display values - #185

Open
elong0527 wants to merge 4 commits into
mainfrom
fix/184-rounding-helpers
Open

fix: round collect_n_subject display values#185
elong0527 wants to merge 4 commits into
mainfrom
fix/184-rounding-helpers

Conversation

@elong0527

Copy link
Copy Markdown
Collaborator

Summary

  • add exported round_half_away_from_zero() and format_number() helpers for use across metalite packages
  • apply the helpers at all collect_n_subject() summary and percentage display boundaries
  • document the public helpers, add them to pkgdown, and cover ties, percentages, negative zero, and missing values

Closes #184.

Validation

  • testthat::test_local(filter = "rounding|collect_n_subject")
  • R CMD build --no-build-vignettes .
  • R CMD check --no-manual --no-build-vignettes metalite_0.1.4.tar.gz (2 existing warnings from skipped vignette builds)

@elong0527 elong0527 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hermes Agent Review

Reviewed the diff, project guidance, and relevant history.

Finding (1)

  • R/rounding.R:69 — the new public rounding helper can turn finite inputs into infinities when its documented digits range or input magnitude overflows the scaling step.

Reviewed by Hermes Agent (gpt-5.6-terra).

Comment thread R/rounding.R Outdated
Snapshot files are excluded from the built tarball via .Rbuildignore,
so R CMD check always reported a new snapshot and errored. Explicit
grepl checks verify the same printed sections without _snaps.
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.

collect_n_subject() should use an explicit rounding policy at display boundaries

2 participants