I currently do it as follows:
Code:
sysuse auto foreach renaming_pair in "make model" "mpg mileage" "rep78 repair" { label variable `=word("`renaming_pair'", 1)' `"`=word("`renaming_pair'", 2)'"' }
1. How to achieve the same result using the following label_lookup_table.csv?
Code:
var_name, new_label make, model mpg, mileage rep78, repair
Code:
var_name, new_label make, model mpg, mileage rep78, repair foo, bar baz, buzz
0 Response to How to batch (re)label variables using a CSV lookup table
Post a Comment