Hello,
I am attempting to rename a group of series by replacing part of the series name with an equivalent but different name. See below for an example:
pop_35614 rename as pop_newy
pop_31084 rename as pop_losa
Basically, I have two lists: one with the numbers (35614, 31084, etc.) and a matching one with the replacements (newy, losa, etc.). Since there are 71 different series, how can I rename these without having to rename them one by one?
Thanks!
Rename series loop
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Rename series loop
Where are the lists stored?
Re: Rename series loop
Currently they are in a temp variable
%MET = "35614 31084 etc"
%METR = "newy losa etc"
BUT, I can organize it whatever way is the best way to go about replacing one with the other.
Thanks!
Brendon
%MET = "35614 31084 etc"
%METR = "newy losa etc"
BUT, I can organize it whatever way is the best way to go about replacing one with the other.
Thanks!
Brendon
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Rename series loop
Code: Select all
for !i=1 to @wcount(%met)
%src = @word(%met,!i)
%dest = @word(%metr, !i)
rename pop_{%src} pop_{%dest}
next
Re: Rename series loop
Thank you very much! This is great!
Who is online
Users browsing this forum: No registered users and 2 guests
