Learn R Programming

socialmixr (version 0.7.0)

check_grouping_columns: Check that a survey contains the columns required by a list of groupings

Description

Internal helper used by compute_matrix() to validate that every grouping's participant- and contact-side column is present on the supplied survey() object. Aborts with a single message listing all missing columns; suggests assign_age_groups() when the "age" grouping is among the missing.

Usage

check_grouping_columns(groupings, survey)

Value

invisibly NULL on success; otherwise raises a cli error

Arguments

groupings

a list of grouping triples as returned by resolve_groupings()

survey

a survey() object