Checks the metadata yaml file for any excluded observations. If there are none, returns the original data. If there are excluded observations returns the mutated data with excluded observations flagged in a new column.

process_flag_excluded_observations(data, metadata)

Arguments

data

Tibble or dataframe containing the study data

metadata

Yaml file with metadata

Value

Dataframe with flagged excluded observations if there are any