Edit a cell by command

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

jana
Posts: 3
Joined: Mon Jun 20, 2011 3:36 am

Edit a cell by command

Postby jana » Fri Jul 15, 2011 2:27 am

Hello,
I am using EViews 7 and have a problem with finding the command for editing a cell.

I have an alpha object of 27 EU-countries and want to change "UK" to "GB". I did this manually by using "edit" but I am sure there is an easier way.
It would be great if someone could help me and tell me the command for that.

Thanks in advance, this forum has helped my several time, you are doing a great job!

Jana

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

Re: Edit a cell by command

Postby EViews Gareth » Fri Jul 15, 2011 8:09 am

Set the sample to be the observations you're interested in changing, then assign the alpha object. It sounds as though in your case you could do this:

Code: Select all

smpl if country = "UK" country = "GB" smpl @all
if "country" is the name of your alpha.


Another way would be to use the string manipulation functions:

Code: Select all

country = @replace(country, "UK", "GB")

jana
Posts: 3
Joined: Mon Jun 20, 2011 3:36 am

Re: Edit a cell by command

Postby jana » Sat Jul 16, 2011 6:43 am

I tried your second proposal and it worked perfectly.

Thanks a lot!!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 1 guest