I have the following data (first time using dataex, apologies if I did it right)
input long id byte(v1271 v1272 v12113 v12137)
12530 . . . .
71538 . . . .
168244 . . . .
172310 . . . .
172774 . . . .
173127 . . . .
I would like to rename v* so that the numbers are consecutive, ie, v1271 to v1, v1272 to v2, etc. I have thousands of variables, so listing the new variable names is not an option. I have played with just about every option associated with "rename" I know and nothing's working.
Added fun twist: at some point in post estimation, I will need to restore the original variable names. So pre-estimation, v1271 needs to become v1, but post-estimation, I need to reset the name to v1271.
Thanks in advance,
Bryan
input long id byte(v1271 v1272 v12113 v12137)
12530 . . . .
71538 . . . .
168244 . . . .
172310 . . . .
172774 . . . .
173127 . . . .
I would like to rename v* so that the numbers are consecutive, ie, v1271 to v1, v1272 to v2, etc. I have thousands of variables, so listing the new variable names is not an option. I have played with just about every option associated with "rename" I know and nothing's working.
Added fun twist: at some point in post estimation, I will need to restore the original variable names. So pre-estimation, v1271 needs to become v1, but post-estimation, I need to reset the name to v1271.
Thanks in advance,
Bryan
Comment