Hi
Anyone knows how to quickly and sequentially loop over the following 130 series and put them in a group?
series01, series02, series03, ..., series10, series11, ..., series129, series130
I just struggle how to sequentially loop over the first 9 series ...
Andrejs
For loop over series
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13315
- Joined: Tue Sep 16, 2008 5:38 pm
Re: For loop over series
Well if they're named like that, and there aren't any other series that start with "series" you could just do:
But more generally you have to condition on the number, unfortunately:
Or you could just do two for loops.
Code: Select all
group g series*
But more generally you have to condition on the number, unfortunately:
Code: Select all
group g
for !i=1 to 130
if !i<10 then
g.add series0{!i}
else
g.add series{!i}
endif
next
Or you could just do two for loops.
Code: Select all
for !i=1 to 9
g.add series0{!i}
next
for !i=10 to 130
g.add series{!i}
next
Follow us on Twitter @IHSEViews
Re: For loop over series
Thanks, Gareth!
In the end, this is what I also did - split before and after 10...
I was thinking, maybe, there is more elegant way how to do it ..
Andrejs
In the end, this is what I also did - split before and after 10...
I was thinking, maybe, there is more elegant way how to do it ..
Andrejs
Who is online
Users browsing this forum: No registered users and 29 guests