View source: R/compute-matrix.R
| compute_matrix | R Documentation |
Computes a contact matrix from a contact_survey that has been processed
by assign_age_groups() and optionally weigh(). This is the final step
in the pipeline workflow.
For post-processing, pipe the result into symmetrise(),
split_matrix(), or per_capita().
compute_matrix(survey, counts = FALSE, weight_threshold = NULL)
survey |
a |
counts |
whether to return counts instead of means |
weight_threshold |
numeric; if provided, weights above this threshold are capped to the threshold value and then re-normalised (default NULL) |
a list with elements matrix and participants
data(polymod)
polymod |>
assign_age_groups(age_limits = c(0, 5, 15)) |>
compute_matrix()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.