This function checks whether all fields that existed in a previous dataset are still present in a new dataset, based on a metadata reference. It warns if any fields from the previous dataset are missing in the new dataset.
assert_field_existence(new_data, previous_data, metadata)
No return value. The function issues warnings if any expected fields are missing in the new dataset.
A data frame. The new dataset whose field names need to be checked.
A data frame. The previous dataset used as a reference for expected fields.
A data frame. Metadata containing a column named raw_field_name
, which defines the expected field names.