Page 1 of 1

Edit a cell by command

Posted: Fri Jul 15, 2011 2:27 am
by jana
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

Re: Edit a cell by command

Posted: Fri Jul 15, 2011 8:09 am
by EViews Gareth
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")

Re: Edit a cell by command

Posted: Sat Jul 16, 2011 6:43 am
by jana
I tried your second proposal and it worked perfectly.

Thanks a lot!!