Skip to contents

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, includes ingtot and ingtot_pc when available.

include_weight

Logical. If TRUE, includes the first observed fexp value per household when available.

Value

A tibble with one row per household.