I have a two time period data (baseline in 2014 and midline in 2016). The variables in the baseline survey are in this format: var1, var2, var3, .... The variables in the midline survey are in this format: var1_m, var2_m, var3_m, ....
I want to rename the variables to this, with corresponding year:
var1_2014, var2_2014, var3_2014, ........, var1_2016, var2_2016, var3_2016
I can do it for the midline variables using this command:
Code:
rename *_m *_2016
Thanks!
0 Response to Renaming a set of variables with a single command
Post a Comment