Learn R Programming

socialmixr (version 0.4.0)

clean: Clean contact survey data

Description

Cleans survey data to work with the 'contact_matrix' function

Usage

# S3 method for survey
clean(x, country.column = "country", participant.age.column = "part_age", ...)

Value

a cleaned survey in the correct format

Arguments

x

A survey() object

country.column

the name of the country in which the survey participant was interviewed

participant.age.column

the column in x$participants containing participants' age

...

ignored

Examples

Run this code
data(polymod)
cleaned <- clean(polymod) # not really necessary as the 'polymod' data set has already been cleaned

Run the code above in your browser using DataLab