How to change both name and display name of variable

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

loulouviews
Posts: 60
Joined: Wed Mar 11, 2015 2:19 am

How to change both name and display name of variable

Postby loulouviews » Mon Sep 07, 2015 7:10 am

Hi,

I've a bunch of variable I'm importing from a HTML page with the function wfopen. The webpage also provides names (that I want to change) and description (that I want to keep).
Then I rename those variables with the rename X Y EViews function. Unfortunately, EViews does not change the displayname of the variables.
Does anybody have an idea to change both name and displayname of a variable ?

Thanks in advance,

Loulouviews


PS : I'm using EViews 8

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

Re: How to change both name and display name of variable

Postby EViews Gareth » Mon Sep 07, 2015 10:59 am

You'll have to use the series.displayname command to change the displaynames separately.

loulouviews
Posts: 60
Joined: Wed Mar 11, 2015 2:19 am

Re: How to change both name and display name of variable

Postby loulouviews » Mon Feb 29, 2016 1:46 am

Hi,

I'm reopening this thread because I'm renaming series by doing

Code: Select all

rename {%oldname} {%newname}
But when plotting the series, EViews still displays the oldname.
Since I've more than 8000 series renamed in a loop and renaming each sequentially, I'd prefer not doing another loop with .displayname proc.

Thanks a lot in advance !

Louis

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

Re: How to change both name and display name of variable

Postby EViews Gareth » Mon Feb 29, 2016 9:17 am

I think you have no choice.

loulouviews
Posts: 60
Joined: Wed Mar 11, 2015 2:19 am

Re: How to change both name and display name of variable

Postby loulouviews » Wed Mar 02, 2016 3:58 am

Ok, thanks for your reply.
How can I get the original name of a variable then ?
Here is my problem : I'm reading series from a .tsv file. EViews is reading it perfectly except for a bunch of variables which got a name longer than 24 characters.
EViews automatically renames them but it also stores the "real name" in a "original name" field.
How can I get access to it ?
I would imagine something like :

Code: Select all

string %myName=name_of_the_series.@originalname
Thanks for your help.

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

Re: How to change both name and display name of variable

Postby EViews Gareth » Wed Mar 02, 2016 9:19 am

Try:

Code: Select all

%myname = name_of_series.@attr("originalname")

loulouviews
Posts: 60
Joined: Wed Mar 11, 2015 2:19 am

Re: How to change both name and display name of variable

Postby loulouviews » Wed Mar 02, 2016 10:29 am

Thanks a lot for your reply !
Finally I noticed that the displayname was still the original name so I did

Code: Select all

%name=name_of_series.@displayname

cmm1603
Posts: 1
Joined: Mon May 02, 2016 1:29 pm

Re: How to change both name and display name of variable

Postby cmm1603 » Mon May 02, 2016 1:37 pm

Hi there,

I imported data from a Eurostat table and I want to know how I can change multiple variables names collectively by assigning a prefix to all of them. I know how to rename variables one by one but want to know if there's a more time efficient way to do this.
All variables start with different things (list of variable below as an example):
currency_and_deposits
equity_investments
long_term___loans
unlisted_shares

I want to be able to add a prefix such as "gga" in front of all the names:
gga_currency_and_deposits
gga_equity_investments
gga_long_term___loans
gga_unlisted_shares

Is this doable?

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

Re: How to change both name and display name of variable

Postby EViews Gareth » Mon May 02, 2016 1:49 pm

Code: Select all

rename * gga_*
You might/will hit the 24 character maximum though.

bobhughesaier
Posts: 3
Joined: Thu Nov 19, 2015 9:46 am

Re: How to change both name and display name of variable

Postby bobhughesaier » Thu Jun 02, 2016 11:30 am

Any plans to expand that 24 character limit?

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

Re: How to change both name and display name of variable

Postby EViews Gareth » Thu Jun 02, 2016 11:47 am

It is on the list of things to contemplate, yes.

bobhughesaier
Posts: 3
Joined: Thu Nov 19, 2015 9:46 am

Re: How to change both name and display name of variable

Postby bobhughesaier » Thu Jun 02, 2016 12:24 pm

OK. So, it doesn't sound like it'll be in the next version/update. For what it's worth, it gets my vote as a high priority. Thanks Gareth.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests