This function checks whether the data types of fields in a dataset match the expected types specified in the metadata. It warns if any fields have a different type than expected.

assert_type_consistency(data, metadata)

Arguments

data

A data frame. The dataset containing the fields to validate.

metadata

A data frame. Metadata specifying the expected data types for each field. It must include the columns raw_field_name, type_of_variable, and preferred_field_name.

Value

No return value. The function issues warnings if any fields have an unexpected type.