Learn R Programming

socialmixr (version 0.5.0)

clean: Clean contact survey data

Description

Cleans survey data to work with the 'contact_matrix' function

Usage

# S3 method for contact_survey
clean(
  x,
  participant_age_column = "part_age",
  ...,
  participant.age.column = deprecated()
)

Value

a cleaned survey in the correct format

Arguments

x

A survey() object

participant_age_column

the column in x$participants containing participants' age

...

ignored

participant.age.column

[Deprecated] Use participant_age_column instead.

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