How to change both name and display name of variable
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
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
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
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
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
I'm reopening this thread because I'm renaming series by doing
Code: Select all
rename {%oldname} {%newname}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
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
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 :
Thanks for your help.
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
-
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
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
Thanks a lot for your reply !
Finally I noticed that the displayname was still the original name so I did
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
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?
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
Code: Select all
rename * gga_*
-
bobhughesaier
- Posts: 3
- Joined: Thu Nov 19, 2015 9:46 am
Re: How to change both name and display name of variable
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
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
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.
Who is online
Users browsing this forum: No registered users and 2 guests
