Skip to content

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

@lwhittles

Description

@lwhittles

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions