Split data based on alternative welfare
pd_split_alt_welfare.RdSplit data into two dataframes when there is alternative welfare in the same survey
Arguments
- dt
data table loaded with
pipload::pip_load_dlw()- cpfw
data frame with Price framework data for country/survey in
df. It is loaded withget_country_pfw(df, pfw).pfwis loaded inpipload::pip_load_aux("pfw")
Examples
if (FALSE) { # \dontrun{
release <- "20250203"
pipfun::setup_working_release(release)
md <- pipload::pip_load_dlw(country = "PHL", 2012)
md <- survey_id_to_attr(md, unique(md$survey_id))
pfw <- pipload::pip_load_aux("pfw")
cpfw <- get_country_pfw(md, pfw)
df <- pd_split_alt_welfare(md, cpfw)
} # }