Precision control for table.save

For questions regarding programming in the EViews programming language.

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

Ravi
Posts: 11
Joined: Fri Apr 29, 2011 6:22 am

Precision control for table.save

Postby Ravi » Fri Feb 10, 2012 4:04 am

Hi folks,
I am searching for a mechanism to control precesion of numeric values when I execute

Code: Select all

table.save temp.csv
I searched and found some option in wfsave, but I want to save just a single table object and not the entire workfile

Any help will be appreciated

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: Precision control for table.save

Postby EViews Jason » Fri Feb 10, 2012 8:33 am

You can save using full precision via the 'f' option. For example,

Code: Select all

mytable.save(f) myfile 'save mytable to a csv file named myfile.csv with full precision
If you want to specify the precision, change the precision for all your cells in the table using the table 'setformat' command and then save. For example,

Code: Select all

mytable.setformat(@all) g.5 ' change formatting in all the cells in table to use 5 significant digits

Ravi
Posts: 11
Joined: Fri Apr 29, 2011 6:22 am

Re: Precision control for table.save

Postby Ravi » Fri Feb 17, 2012 3:50 am

Thanks Jason.
Your suggestion worked fine


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests