If I have 24 series and their names are as follows:
alpha_1999_m1
alpha_1999_m2
alpha_1999_m3
.
.
.
alpha_1999_m12
alpha_2000_m1
alpha_2000_m2
alpha_2000_m3
.
.
.
alpha_2000_m12
I want to rename them to alpha_1 alpha_2 .... alpha_24.
How can I write program code to do it? Thank you!
About Renaming Many Series
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: About Renaming Many Series
Code: Select all
group g alpha_*
for !i=1 to 24
%oldname = g.@seriesname(!i)
%newname = "alpha" + @str(!i)
rename {%oldname} {%newname}
next
-
kinon902003
- Posts: 12
- Joined: Tue Mar 06, 2012 7:26 pm
Re: About Renaming Many Series
Thank you very much for the code.
May I ask one more thing? How should I write the code to do the rename if what I have is 24 matrix instead of 24 series? I cannot form a group for matrix. Thanks.
May I ask one more thing? How should I write the code to do the rename if what I have is 24 matrix instead of 24 series? I cannot form a group for matrix. Thanks.
Who is online
Users browsing this forum: No registered users and 1 guest
