Creates a one-row-per-household profile from a person-level ENEMDU data frame.
If hsize is not present, it is built automatically.
Usage
enemdu_build_household_profile(
data,
household_id = "idhogar",
hsize = "hsize",
include_income = TRUE,
include_weight = TRUE
)Arguments
- data
A data frame.
- household_id
Household identifier. Defaults to
"idhogar"and falls back to"id_hogar"when needed.- hsize
Household-size variable.
- include_income
Logical. If
TRUE, includesingtotandingtot_pcwhen available.- include_weight
Logical. If
TRUE, includes the first observedfexpvalue per household when available.