sub-.contact_survey: Subset a contact survey

[.contact_surveyR Documentation

Subset a contact survey

Description

Filters a contact_survey object using an expression. The expression is evaluated against whichever table(s) contain the referenced columns (participants, contacts, or both). When participants are filtered, contacts are automatically pruned to matching part_ids.

Usage

## S3 method for class 'contact_survey'
x[i, ...]

Arguments

x

a contact_survey object

i

an expression to evaluate as a row filter (e.g. country == "United Kingdom")

...

ignored

Value

a filtered contact_survey object

Examples

data(polymod)
polymod[country == "United Kingdom"]


socialmixr documentation built on April 29, 2026, 9:07 a.m.