Page 1 of 1

Customizing Table

Posted: Mon Dec 05, 2011 9:30 am
by DanielArmani
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

Re: Customizing Table

Posted: Mon Dec 05, 2011 9:42 am
by EViews Gareth
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

Re: Customizing Table

Posted: Thu May 09, 2013 5:56 am
by Novi
Hi!
is there something like mytable.addrow(1) ?
I am desperately in need of it!

Re: Customizing Table

Posted: Thu May 09, 2013 6:38 am
by trubador
To insert three additional rows starting at the second row:

Code: Select all

mytable.insertrow(2) 3

Re: Customizing Table

Posted: Thu May 09, 2013 6:41 am
by Novi
Thanks so much!
(ps. consider adding these sets of commands to the Command REF, not sure they are there yet)

Re: Customizing Table

Posted: Thu May 09, 2013 7:51 am
by EViews Gareth
Since they are table commands, they are in the Object Reference, in the table section.