For some periods of reference, there are multiple values in the DataSourceYear variable. For these cases, the criteria is to choose the latest DataSourceYear.
dd_latest_source_year(data)
The data to be harmonized
A dataset with a unique DataSourceYear per id and age label.
You can run getAnywhere(dd_latest_source_year)
to view the definition of this function.
if (FALSE) {
df <- latest_source_year_df
df <- dd_latest_source_year(df)
}