Add zero when the income source was skipped
Source:R/add_income_source_zero_to_sl.R
add_income_source_zero_to_sl.Rd
Add zero when the income source was skipped
Usage
add_income_source_zero_to_sl(
df,
income_source = "cm_income_source",
none = "none",
undefined = c("dnk", "pnta"),
income_sources = c("cm_income_source_salaried_n", "cm_income_source_casual_n",
"cm_income_source_own_business_n", "cm_income_source_own_production_n",
"cm_income_source_social_benefits_n", "cm_income_source_rent_n",
"cm_income_source_remittances_n", "cm_income_source_assistance_n",
"cm_income_source_support_friends_n", "cm_income_source_donation_n",
"cm_income_source_other_n")
)
Arguments
- df
A data frame.
- income_source
A character string. The name of the column that contains the income source.
- none
A character string. The value that indicates that the income source was skipped.
- undefined
A character vector. The values that indicate that the income source was skipped.
- income_sources
A character vector. The names of the columns that contain the amount of income sources.