string vector question
Posted: Fri Feb 27, 2015 11:33 am
Hello,
Eviews 8 here. I have string vector with 15 names. I want to drop 2 names (based on certain criteria) from this svector and create new svector (13) with the rest of the names. I used If statement and it correctly identifies the names (let's say 5th and 10th) that I want to drop but when the code creates new svector it leaves rows 5 and 10 blank for dropped names. How can I bypass the empty rows and svector would move lower names into empty rows?
Here is the simple loop that I used:
!lead=@columns(TIME1) '13columns
!all=@rows(all) '15 rows
svector(!lead) svec
for !i=1 to !iall
if test(!i)=0 or test(!i)<0 then
svec(!i)=all(!i)
endif
next
Eviews 8 here. I have string vector with 15 names. I want to drop 2 names (based on certain criteria) from this svector and create new svector (13) with the rest of the names. I used If statement and it correctly identifies the names (let's say 5th and 10th) that I want to drop but when the code creates new svector it leaves rows 5 and 10 blank for dropped names. How can I bypass the empty rows and svector would move lower names into empty rows?
Here is the simple loop that I used:
!lead=@columns(TIME1) '13columns
!all=@rows(all) '15 rows
svector(!lead) svec
for !i=1 to !iall
if test(!i)=0 or test(!i)<0 then
svec(!i)=all(!i)
endif
next