Hi Statalist, I am trying to do something I think should be simple but is giving me trouble.
I have a bunch of variables named in the following format:
...and so on. I am trying to rename all of these at once, just dropping the "z" in the middle of the variable name (to match the variable naming convention of the other waves of data). The problem is that there are 2 characters in the variable name that are counting up (both the number and the letter immediately following the number), so I don't think I can do this:
Because two ** are not allowed. Is there some workaround here that I could use?
I have a bunch of variables named in the following format:
xyz1a_wave1
xyz1b_wave1
xyz1c_wave1
xyz1d_wave1
xyz2a_wave1
xyz2b_wave1
xyz2c_wave1
xyz1b_wave1
xyz1c_wave1
xyz1d_wave1
xyz2a_wave1
xyz2b_wave1
xyz2c_wave1
Code:
rename (xyz**_wave3) (xy**_wave3)
Comment