Prepare cross-tabulated targets for weighting
prep_target_cross.RdExpands and merges cross-tabulated targets for weighting, using crosstab configs from settings. Use for multi-dimensional targets (e.g., age x gender).
Details
Identifies columns for each crosstab target.
Melts, merges, and casts to wide format by crosstab dimensions.
Adds prefix to new columns and joins to original target table.
Returns data.table with expanded crosstab targets.
Assumes input is a data.table and settings are complete.
See also
prepare_targets
Other target preparation:
get_target_methods(),
prep_target_adults(),
prep_target_age(),
prep_target_commutemode(),
prep_target_edulevel(),
prep_target_employment(),
prep_target_ethnicity(),
prep_target_gender(),
prep_target_h_size(),
prep_target_income(),
prep_target_kids(),
prep_target_race(),
prep_target_univstudent(),
prep_target_vehicles(),
prep_target_workers(),
prep_transit_target(),
prepare_targets(),
run_tabulate_method()