We already have get_age_bins()
|
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
We already have get_age_bins()
mpoxseir/R/parameters.R
Lines 118 to 125 in 0357e13
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