Customizing Table

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

Customizing Table

Postby DanielArmani » Mon Dec 05, 2011 9:30 am

Hi there,

I have several question to customizing my tables to extract data, and have a tidier workfile.

I wonder if it is possible to sort a table or a group by observation (descending order by observations number)? For example reversing the table by observation numbers, so we have latest data on first row and oldest data on last row.

How can I delete the rows in a table or a group if the data are NA? This is because I create groups I leave some room to add more data later, so latest data on my tables are NA tables, and when I reverse the table, I will have those rows on top of the table, so I need delete them to be able to extract the first row which they are latest data and result.

Also how I can delete table, group or equation after got the data extracted from them. For example I need to get the equation and extract the coefficients, but I dont need to keep the equation in my workfile anymore. Or if there is anyway we can stop the result be appeared on workfile ( like matlab, when we put a semi column ; at the end of the program line which will stop the program appears)

I have enclose a small sample of the workfile so you can see better what I mean.

Regards

Daniel
Attachments
sample.wf1
(621.13 KiB) Downloaded 597 times

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

Re: Customizing Table

Postby EViews Gareth » Mon Dec 05, 2011 9:42 am

Tables have a deleterow proc:

Code: Select all

mytable.deleterow(2)
will delete the 2nd row.


You cannot sort data in a table.


Groups are tied to the workfile structure. You cannot delete rows from a group, or sort a group, without deleting that observation from the entire workfile, or sorting the entire workfile.

To delete an object, just use the delete command:

Code: Select all

delete mytable

Novi
Posts: 44
Joined: Sun May 16, 2010 11:48 am

Re: Customizing Table

Postby Novi » Thu May 09, 2013 5:56 am

Hi!
is there something like mytable.addrow(1) ?
I am desperately in need of it!

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: Customizing Table

Postby trubador » Thu May 09, 2013 6:38 am

To insert three additional rows starting at the second row:

Code: Select all

mytable.insertrow(2) 3

Novi
Posts: 44
Joined: Sun May 16, 2010 11:48 am

Re: Customizing Table

Postby Novi » Thu May 09, 2013 6:41 am

Thanks so much!
(ps. consider adding these sets of commands to the Command REF, not sure they are there yet)

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

Re: Customizing Table

Postby EViews Gareth » Thu May 09, 2013 7:51 am

Since they are table commands, they are in the Object Reference, in the table section.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests