Matching contents of alpha

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

javiersan
Posts: 184
Joined: Mon Jan 19, 2009 8:18 am

Matching contents of alpha

Postby javiersan » Tue Jan 17, 2012 1:40 pm

Hello,

I have two alpha objects and I want to test whether the elements of one are in the other. Is there any way of doing this?

Thanks,

Javier

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

Re: Matching contents of alpha

Postby EViews Gareth » Tue Jan 17, 2012 2:12 pm

The only way to do this is to create a string containing the elements of the alpha series (and you can only do that by creating a for loop that loops through the elements and adds them to the string list), and then use something like @wunique to get the list of elements in both. If you have many observations, this might become unworkable.

javiersan
Posts: 184
Joined: Mon Jan 19, 2009 8:18 am

Re: Matching contents of alpha

Postby javiersan » Tue Jan 17, 2012 2:50 pm

Thanks Gareth, a loop will do.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests