Is it possible to change labels of spool with coding?

For questions regarding programming in the EViews programming language.

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

dean.hong
Posts: 12
Joined: Fri Jun 03, 2016 10:24 am

Is it possible to change labels of spool with coding?

Postby dean.hong » Mon Jun 13, 2016 10:57 am

Hello,

I am aware that I can change those labels manually, but I have tens of data sets and I would like to have it rather programmed. I have a number of country codes (i.e. US, EZ, JP) but I want to convert them into their full names in the spool as well as to make some other changes. Is there a way to do so? I tried to look up in this website but could not find any case like this. Thanks in advance.
Attachments
JP.PNG
For example, I want to change the label from CAIHAT_JP into Japan CAI.
JP.PNG (22.61 KiB) Viewed 3769 times

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

Re: Is it possible to change labels of spool with coding?

Postby EViews Gareth » Mon Jun 13, 2016 11:23 am

You have to change the label in the graph before adding it to a spool.

I find the easiest way to do that is to modify the display names of the underlying series before making the graph.

dean.hong
Posts: 12
Joined: Fri Jun 03, 2016 10:24 am

Re: Is it possible to change labels of spool with coding?

Postby dean.hong » Mon Jun 13, 2016 12:20 pm

Thanks for the fast response. I am pretty new to EViews, and I searched through the forum to find out that the commands to rename series are:

%dispname = myseries.@displayname
%myname = name_of_series.@attr("originalname")
rename {series name} {display name}

But I run into an error every time I try. For example, I wrote %Japan CAI = caihat_jp.@Japan CAI, because I wan to change caihat_jp into Japan CAI, but the program says %Japan CAI is not defined or illegal. Could you just write one code for me (series name = caihat_jp, display name=Japan CAI) so that I can replicate that code? Thank you.

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

Re: Is it possible to change labels of spool with coding?

Postby EViews Gareth » Mon Jun 13, 2016 12:36 pm

You set a displayname with:

Code: Select all

nameofseries.displayname the display name you want to use

dean.hong
Posts: 12
Joined: Fri Jun 03, 2016 10:24 am

Re: Is it possible to change labels of spool with coding?

Postby dean.hong » Mon Jun 13, 2016 12:44 pm

Many thanks! (it works)


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests