View source: R/postprocess-matrix.R
| split_matrix | R Documentation |
Splits the contact matrix into the mean number of contacts across the whole
population (mean.contacts), a normalisation constant (normalisation),
age-specific contact rates (contacts), and an assortativity matrix
(replacing $matrix). For details, see the "Getting Started" vignette.
split_matrix(x, survey_pop, ...)
x |
a list as returned by |
survey_pop |
a data frame with columns |
... |
passed to |
x with $matrix replaced by the assortativity matrix, plus
additional elements $mean.contacts, $normalisation, and $contacts
data(polymod)
pop <- wpp_age("United Kingdom", 2005)
polymod |>
(\(s) s[country == "United Kingdom"])() |>
assign_age_groups(age_limits = c(0, 5, 15)) |>
compute_matrix() |>
split_matrix(survey_pop = pop)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.