Skip to content

fix: standardize stratified_sampler dist to uppercase and add verbose…#15

Merged
danmcgraw94 merged 1 commit into
mainfrom
fix/stratified-sampler-case
Apr 20, 2026
Merged

fix: standardize stratified_sampler dist to uppercase and add verbose…#15
danmcgraw94 merged 1 commit into
mainfrom
fix/stratified-sampler-case

Conversation

@danmcgraw94

Copy link
Copy Markdown
Collaborator

Summary

Closes #5.

Addresses the documentation inconsistency Sadie flagged in stratified_sampler(): Usage showed dist = "ev1" while Arguments described "EV1", "Normal", "Uniform". The function internally dispatches on tolower(dist), so both casings already worked — but the docs didn't make that clear.

Changes

  • Standardized documentation to use uppercase canonical names ("EV1", "Normal", "Uniform"), matching rfa_simulate()'s convention
  • Changed the default argument value from "ev1" to "EV1" so the signature matches the documentation
  • Added Case-insensitive note to the @param dist description to acknowledge the existing tolerance
  • Added optional verbose argument (default FALSE). When TRUE, emits a cli::cli_inform() message summarizing the stratification on completion

Testing

  • R CMD check passes with 0 errors, 0 warnings, 0 notes
  • Verified case tolerance by calling with "ev1", "EV1", "Normal", and an invalid value
  • No impact on rfa_simulate()verbose defaults to FALSE, and the internal tolower() dispatch was already present

@danmcgraw94
danmcgraw94 merged commit 80b2f8a into main Apr 20, 2026
6 checks passed
@danmcgraw94
danmcgraw94 deleted the fix/stratified-sampler-case branch April 20, 2026 20:18
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.

Resolve stratified_sampler case-sensitivity inconsistency

1 participant