Checks that a survey fulfills all the requirements to work with the 'contact_matrix' function
Usage
# S3 method for class 'contact_survey'
check(
x,
id.column = "part_id",
participant.age.column = "part_age",
country.column = "country",
year.column = "year",
contact.age.column = "cnt_age",
...
)Arguments
- x
A
survey()object- id.column
the column in both the
participantsandcontactsdata frames that links contacts to participants- participant.age.column
the column in the
participantsdata frame containing participants' age; if this does not exist, at least columns "..._exact", "..._est_min" and "..._est_max" must (see theestimated.participant.ageoption incontact_matrix())- country.column
the column in the
participantsdata frame containing the country in which the participant was queried- year.column
the column in the
participantsdata frame containing the year in which the participant was queried- contact.age.column
the column in the
contactsdata frame containing the age of contacts; if this does not exist, at least columns "..._exact", "..._est_min" and "..._est_max" must (see theestimated.contact.ageoption incontact_matrix())- ...
ignored
Examples
data(polymod)
check(polymod)
#> → Check OK.