Skip to contents

Add zero when the infrequent expenditure type was skipped Note: Infrequent expenditure = 6-month recall period

Usage

add_expenditure_type_zero_infreq(
  df,
  expenditure_infreq = "cm_expenditure_frequent",
  none = "none",
  undefined = c("dnk", "pnta"),
  expenditure_infreq_types = c("cm_expenditure_infrequent_shelter",
    "cm_expenditure_infrequent_nfi", "cm_expenditure_infrequent_health",
    "cm_expenditure_infrequent_education", "cm_expenditure_infrequent_debt",
    "cm_expenditure_infrequent_other")
)

Arguments

df

A data frame.

expenditure_infreq

A character string. The name of the column that contains the infrequent expenditures.

none

The value for no expenditure.

undefined

A character vector. The values that indicate that the infrequent expenditures type was skipped.

expenditure_infreq_types

A character vector. The names of the columns that contain the amount of infrequent expenditures types.