Skip to contents

Add zero when the frequent expenditure type was skipped Note:Frequent expenditure = 30-day recall period

Usage

add_expenditure_type_zero_freq(
  df,
  expenditure_freq = "cm_expenditure_frequent",
  none = "none",
  undefined = c("dnk", "pnta"),
  expenditure_freq_types = c("cm_expenditure_frequent_food",
    "cm_expenditure_frequent_rent", "cm_expenditure_frequent_water",
    "cm_expenditure_frequent_nfi", "cm_expenditure_frequent_utilities",
    "cm_expenditure_frequent_fuel", "cm_expenditure_frequent_transportation",
    "cm_expenditure_frequent_communication", "cm_expenditure_frequent_other")
)

Arguments

df

A data frame.

expenditure_freq

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

none

The value for no expenditure.

undefined

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

expenditure_freq_types

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