View source: R/contact-matrix-utils.R
| add_age | R Documentation |
Generic function to add an age column from an exact age column. Works for
both participant and contact data by specifying the column prefix.
If <prefix>_exact exists, it overwrites <prefix> with its values.
Otherwise, it creates <prefix> with NA values if it doesn't exist.
add_age(data, prefix)
data |
A data.table containing age data |
prefix |
Column name prefix: "part_age" for participants, "cnt_age" for contacts |
The data with the age column set from exact ages or initialised to NA
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.