Convert alpha series to svector

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

ErikG
Posts: 85
Joined: Wed Jan 23, 2013 1:18 am

Convert alpha series to svector

Postby ErikG » Mon Sep 01, 2014 7:51 am

Hi,

Is there an easy way to convert an alpha series to an svector? That is, aside from using a loop with element by element assignment into a new svector?

As I understand it it is possible to convert a text object to an s vector, but if I would go through that detour I would have problems with blank spaces.

Regards,
/Erik.

Eviews 8 Standard edition july 29 build

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

Re: Convert alpha series to svector

Postby EViews Gareth » Mon Sep 01, 2014 2:55 pm

Possibly:

Code: Select all

Svector a = @convert(b)

ErikG
Posts: 85
Joined: Wed Jan 23, 2013 1:18 am

Re: Convert alpha series to svector

Postby ErikG » Tue Sep 02, 2014 12:02 am

It works, thanks!

(Ignore my last comment that I deleted, it was incorrect)

/Erik.

ErikG
Posts: 85
Joined: Wed Jan 23, 2013 1:18 am

Re: Convert alpha series to svector

Postby ErikG » Tue Sep 02, 2014 4:31 am

How about the other way around - converting an svector to an alpha series? mtos doesn't seem to work well.
/Erik.

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

Re: Convert alpha series to svector

Postby EViews Gareth » Tue Sep 02, 2014 8:02 am

There isn't a way to do that yet.

ErikG
Posts: 85
Joined: Wed Jan 23, 2013 1:18 am

Re: Convert alpha series to svector

Postby ErikG » Fri Sep 05, 2014 4:14 am

Hi again, I've got another question about converting alpha series and the like:

There are a number of handy functions for strings, like @wunion, @wintersect and so on. Are there any equivalent functions for alpha series? If not, I would like to convert my alpha series to a rather long string. Is there any convenient way of doing that besides looping over the elements in the alphaseries?

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

Re: Convert alpha series to svector

Postby EViews Gareth » Fri Sep 05, 2014 8:27 am

What would @wunion or @wintersect do on an alpha?

ErikG
Posts: 85
Joined: Wed Jan 23, 2013 1:18 am

Re: Convert alpha series to svector

Postby ErikG » Mon Sep 08, 2014 12:20 am

Hi,

I guess the returned object would have to be a string or possibly an svector, and that string would be the union or intersection of the elements in the alpha. I can see why you wouldn't want to have these functions for alphas, but is there a simple way to go from an alpha to a string so that I can use them indirectly?

/Erik.

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

Re: Convert alpha series to svector

Postby EViews Gareth » Mon Sep 08, 2014 8:10 am

Only by looping through the elements one at a time and adding them to a string yourself.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 1 guest