Mixing the commands

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

DanielArmani
Posts: 12
Joined: Wed Apr 13, 2011 4:08 am

Mixing the commands

Postby DanielArmani » Tue Dec 06, 2011 4:50 am

Hi there,

I use eviews6, I have tried and write some codes to delete the unwanted rows from my tables but it did not work. the code shoud delete the 3dr row of the table if the cointain of cell 3b is NA and repeat. the code is as follow;

while gpr_{!i}_{!j}(3b) = na
gpr_{!i}_{!j}.deleterow(3)
wend

I wonder if you can help me to do that. for example I need to delete the 3rd row of table gpr_1_2 if the cell(3b) (3rd row,column B) is NA. this need to repeat untill there are no more NA in table ( see table gpr_1_2 in sample workfile). this need to be repeated for all the other pairs too.

To explain more, I import my data into a workfile but because I need to add more data later I specify observation number more than it is, so I have free cells to use during the day. when I test my data, I create some table and reverse the observations in the table, so the latest data are on top of the table. as I add the data during the day the number of rows with NA date reduce. I need to delete these rows to get the latest data on top row so I can address the result table to pick up some data form those tables. the attachment file is only a sample, my real data observation ia more than 10000 and I cannon address it by number. Please have a look at table gpr_1_2. hope my explination help.

Regards

Daniel
Attachments
sample.wf1
(416.66 KiB) Downloaded 459 times

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: Mixing the commands

Postby EViews Gareth » Tue Dec 06, 2011 9:34 am

Code: Select all

while gpr_{!i}_{!j}(3,2) = "NA" gpr_{!i}_{!j}.deleterow(3) wend


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests