Checks that a survey fulfills all the requirements to work with the 'contact_matrix' function
# S3 method for contact_survey
check(
x,
id.column = "part_id",
participant.age.column = "part_age",
country.column = "country",
year.column = "year",
contact.age.column = "cnt_age",
...
)invisibly returns a character vector of the relevant columns
A survey() object
the column in both the participants and
contacts data frames that links contacts to participants
the column in the participants
data frame containing participants' age; if this does not
exist, at least columns "..._exact", "..._est_min" and
"..._est_max" must exist (see the
estimated.participant.age option in contact_matrix())
the column in the participants data
frame containing the country in which the participant was
queried
the column in the participants data frame
containing the year in which the participant was queried
the column in the contacts data
frame containing the age of contacts; if this does not exist,
at least columns "..._exact", "..._est_min" and
"..._est_max" must exist (see the
estimated.contact.age option in contact_matrix())
ignored
data(polymod)
try(check(polymod))
Run the code above in your browser using DataLab