Hi Statalist,
Apologies for what is probably a very basic question.
I am trying to rename a list of variables to have the same root and with ascending sequence of numbers. The original variable names look something like: xb xc xd ... xp
and I am trying to rename them to something like: z2 z3 z4 ... z15.
I am trying to avoid doing this manually. I have tried using a combination of locals and loops but am a beginner with those commands. Any help is much appreciated.
Thank you!
Robbie
Apologies for what is probably a very basic question.
I am trying to rename a list of variables to have the same root and with ascending sequence of numbers. The original variable names look something like: xb xc xd ... xp
and I am trying to rename them to something like: z2 z3 z4 ... z15.
I am trying to avoid doing this manually. I have tried using a combination of locals and loops but am a beginner with those commands. Any help is much appreciated.
Thank you!
Robbie
Comment