Skip to contents

Appends new value labels for income_broad bins to the value_labels table, ensuring all bins are labeled for downstream use.

Usage

update_income_broad_labels(value_labels, settings, max_income_bin = NULL)

Arguments

value_labels

data.table with required columns:

  • variable — variable name

  • value — bin code

  • label — bin label Rows: one per bin.

settings

list. Project settings for bin mapping.

max_income_bin

integer. Maximum income bin. Default: from settings or value_labels.

Value

data.table with appended income_broad labels.

Details

  • Checks for existing income_broad labels and appends if missing.

  • Handles legacy cases where income_followup is missing.

  • Returns updated value_labels table; does not modify by reference.