wfsave ?

For questions regarding programming in the EViews programming language.

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

eviewsnew
Posts: 22
Joined: Fri Apr 22, 2011 2:58 pm

wfsave ?

Postby eviewsnew » Fri Apr 22, 2011 5:07 pm

When I write a data to .csv file, using either wfsave or write command, how can I keep the collumn heads (variable names)?

thanks!

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

Re: wfsave ?

Postby EViews Gareth » Fri Apr 22, 2011 10:03 pm

They're kept automatically.

eviewsnew
Posts: 22
Joined: Fri Apr 22, 2011 2:58 pm

Re: wfsave ?

Postby eviewsnew » Mon Apr 25, 2011 11:08 am

thanks.

I find that the wfsave works, but it has to be for saving the "default" workfile - the open file at the moment?

with the write, when i use test.write(t=csv) " filepath\filename.csv", i got a message, "write is not a valid view for test in "do_test.write....". What does it mean?

thanks!

They're kept automatically.

eviewsnew
Posts: 22
Joined: Fri Apr 22, 2011 2:58 pm

Re: wfsave ?

Postby eviewsnew » Mon Apr 25, 2011 12:05 pm

Also, if I want to get a vector a into a series b , and want to save a dataset with this series along with a few other series (c and d) from the workfile (not the whole workfile), shall I do the following?

1. create a series from the vector a: series b=a

2. make a group out of b and c and d
group x b c d

3, save the group - i want to keep the series names?

wfsave x ? -- default workfile?

or x.write(t=csv)=... -- how to get the series names?

I assume this is a common question. I just couldn't figure it out. I'm still confused with the workfile, series, matrix...concept. Thank you very much!





They're kept automatically.

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

Re: wfsave ?

Postby EViews Gareth » Mon Apr 25, 2011 12:24 pm

When you use WFSAVE, the entire workfile will be saved under what ever filename you choose to give it (see the Command Reference for more information on WFSAVE). By default, WFSAVE will save the file as an EViews workfile, and all objects in all pages in the workfile (groups, series, equations, matrices, vectors, systems, models, graphs, tables, etc...) will be saved. If you don't want the entire workfile saved, you can specify which objects to save.

If you wish to save as another file format (CSV, XLS, whatever), then you can specify that in the WFSAVE command too. However for non-EViews formats, only series (and possibly valmap) objects will be saved.

There is no valid reason to use the WRITE command, that I can think of. It is only kept around for backwards compatibility.

eviewsnew
Posts: 22
Joined: Fri Apr 22, 2011 2:58 pm

Re: wfsave ?

Postby eviewsnew » Thu Apr 28, 2011 2:01 pm

When you use WFSAVE, the entire workfile will be saved under what ever filename you choose to give it (see the Command Reference for more information on WFSAVE). By default, WFSAVE will save the file as an EViews workfile, and all objects in all pages in the workfile (groups, series, equations, matrices, vectors, systems, models, graphs, tables, etc...) will be saved. If you don't want the entire workfile saved, you can specify which objects to save.

If you wish to save as another file format (CSV, XLS, whatever), then you can specify that in the WFSAVE command too. However for non-EViews formats, only series (and possibly valmap) objects will be saved.

There is no valid reason to use the WRITE command, that I can think of. It is only kept around for backwards compatibility.

thanks, now i'm saving the series with the wfsave command. But one question about format for time. I have a 1990Q1 format time series, after saving it to .csv, it is 1/1/1990. How can I keep the original 1990Q1 format?

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

Re: wfsave ?

Postby EViews Gareth » Thu Apr 28, 2011 2:29 pm

Code: Select all

alpha mydate = @datestr(@date, "YYYY[Q]Q")
Then save mydate along with the rest of your series.

Allexander
Posts: 2
Joined: Sun Feb 09, 2014 10:44 am

Re: wfsave ?

Postby Allexander » Wed Feb 12, 2014 11:10 pm

Why doesn't wfsave save the date column? is it done automatically or should I add any options? by the way, I use Eviews5.

Thank you


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests