Skip to contents

Applies measure-specific filtering logic: CPI is filtered by country, year, and survey acronym; PPP by country only (with a computed ppp_version column); population, GDP, and PCE by country and year.

Usage

filter_aux_data(measure, aux_data, id)

Arguments

measure

Character scalar. One of "cpi", "ppp", "pop", "gdp", "pce".

aux_data

A data.table of the auxiliary dataset.

id

A named list of survey identifiers (e.g., country_code, surveyid_year, survey_acronym).

Value

A filtered data.table with only the rows matching the survey identifiers.