Page 1 of 1
How to change both name and display name of variable
Posted: Mon Sep 07, 2015 7:10 am
by loulouviews
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
Re: How to change both name and display name of variable
Posted: Mon Sep 07, 2015 10:59 am
by EViews Gareth
You'll have to use the series.displayname command to change the displaynames separately.
Re: How to change both name and display name of variable
Posted: Mon Feb 29, 2016 1:46 am
by loulouviews
Hi,
I'm reopening this thread because I'm renaming series by doing
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
Re: How to change both name and display name of variable
Posted: Mon Feb 29, 2016 9:17 am
by EViews Gareth
I think you have no choice.
Re: How to change both name and display name of variable
Posted: Wed Mar 02, 2016 3:58 am
by loulouviews
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.
Re: How to change both name and display name of variable
Posted: Wed Mar 02, 2016 9:19 am
by EViews Gareth
Try:
Code: Select all
%myname = name_of_series.@attr("originalname")
Re: How to change both name and display name of variable
Posted: Wed Mar 02, 2016 10:29 am
by loulouviews
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
Re: How to change both name and display name of variable
Posted: Mon May 02, 2016 1:37 pm
by cmm1603
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?
Re: How to change both name and display name of variable
Posted: Mon May 02, 2016 1:49 pm
by EViews Gareth
You might/will hit the 24 character maximum though.
Re: How to change both name and display name of variable
Posted: Thu Jun 02, 2016 11:30 am
by bobhughesaier
Any plans to expand that 24 character limit?
Re: How to change both name and display name of variable
Posted: Thu Jun 02, 2016 11:47 am
by EViews Gareth
It is on the list of things to contemplate, yes.
Re: How to change both name and display name of variable
Posted: Thu Jun 02, 2016 12:24 pm
by bobhughesaier
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.