Fix value labels on load
fix_value_labels_on_load.RdHelper to fix value labels when loading HTS tables. Drops duplicates and formats income_broad labels. Use for cleaning value label tables.
Details
Updates income_broad labels using settings.
Drops duplicate variable-value pairs and reports them.
Returns a copy; does not modify by reference.
See also
update_income_broad_labelsscripts/io/fetch_hts_table.R
Other io utilities:
clean_data_dict(),
cut_and_label(),
db_table_has_geometry(),
fetch_acs(),
fetch_all_hts_tables(),
fetch_from_db(),
fetch_hts_table(),
fetch_pums(),
fetch_study_region(),
find_project_root(),
get_db_table_name(),
print_params(),
pums_checksum(),
read_from_db(),
read_pums_codebook(),
record_checksum(),
sampled_latlon_to_bg()
Examples
## Not run:
dt <- data.table(variable = "income_broad", value = 1)
settings <- list()
fix_value_labels_on_load(dt, settings)
#> Error in fix_value_labels_on_load(dt, settings): could not find function "fix_value_labels_on_load"
## End(Not run)