Dear all,
I have a data set which contains many variables e.g. with a country prefix: "mexiko_variablename", I would like to rename this variable without the name of the country in front of it.
the normal way would just be
rename mexiko_variablename variablename
However, I have plenty of those variables and I would like to do it with a loop. Can someone tell me how this loop would look like?
Many thanks in advance
I have a data set which contains many variables e.g. with a country prefix: "mexiko_variablename", I would like to rename this variable without the name of the country in front of it.
the normal way would just be
rename mexiko_variablename variablename
However, I have plenty of those variables and I would like to do it with a loop. Can someone tell me how this loop would look like?
Many thanks in advance
Comment