Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add helper functions that return risk / vaccination group indices #30

Open
lwhittles opened this issue Sep 13, 2024 · 0 comments
Open

Comments

@lwhittles
Copy link
Collaborator

lwhittles commented Sep 13, 2024

We already have get_age_bins()

mpoxseir/R/parameters.R

Lines 118 to 125 in 0357e13

get_age_bins <- function() {
end <- c(seq(4, 75, by = 5), 100)
start <- c(0, end[-length(end)] + 1L)
label <- paste(start, end, sep = "-")
label[length(label)] <- paste0(max(start), "+")
data.frame(label = label, start = start, end = end)
}

Which can be used to get names / indices for those, but nice to expand to include SW and PBS as we use this everywhere

Ditto vaccination, so we can update the code easily if we re-order the strata for any reason

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

No branches or pull requests

1 participant