Skip to content
This repository has been archived by the owner on Nov 16, 2024. It is now read-only.

25 remove hardcoded intervals #29

Merged
merged 5 commits into from
Sep 28, 2024
Merged

Conversation

dajmcdon
Copy link
Collaborator

Resolves #25

Note that, while there seem to be 3 optional Confidence Levels for EpiEstim and EpiLPS, there may be more stored in the internals somewhere that I couldn't find.

@dajmcdon dajmcdon linked an issue Sep 27, 2024 that may be closed by this pull request
@dajmcdon dajmcdon requested a review from gvegayon September 27, 2024 21:44
Copy link

@gvegayon gvegayon left a comment

Choose a reason for hiding this comment

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

Terrific. You addressed the single issue I was unsure about, "what if a package doesn't allow specifying levels?".

Comment on lines +187 to +193
allowed_levels <- c(0.95, 0.9, 0.5)
if (min(abs(level - allowed_levels)) > sqrt(.Machine$double.eps)) {
cli::cli_abort(paste(
"For {.pkg EpiEstim}, allowable confidence levels are",
"{.val {allowed_levels}}, not {.val {level}}."
))
}

Choose a reason for hiding this comment

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

Excellent!

@gvegayon gvegayon merged commit 7bbf73f into main Sep 28, 2024
7 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove hardcoded intervals
2 participants