@uniquevals with option to exclude

For questions regarding programming in the EViews programming language.

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

chester
Posts: 44
Joined: Thu May 12, 2016 11:14 am

@uniquevals with option to exclude

Postby chester » Wed Nov 16, 2016 2:06 pm

I have an alpha series called group. I'd like all the unique values in 'group' EXCLUDING blanks.
Is there any option that I can use to achieve this?

Code: Select all

svector uniquegroups =@uniquevals(group) list = @wjoin(uniquegroups)

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

Re: @uniquevals with option to exclude

Postby EViews Gareth » Wed Nov 16, 2016 3:28 pm

There is not, you'll have to manually remove it.

EViews Matt
EViews Developer
Posts: 584
Joined: Thu Apr 25, 2013 7:48 pm

Re: @uniquevals with option to exclude

Postby EViews Matt » Wed Nov 16, 2016 3:52 pm

If you merely want to remove the extra space in the final string, you could use the following quick-and-dirty workaround:

Code: Select all

list = @wjoin(@wsplit(@wjoin(uniquegroups)))
It's not efficient, but it is concise.

chester
Posts: 44
Joined: Thu May 12, 2016 11:14 am

Re: @uniquevals with option to exclude

Postby chester » Thu Nov 17, 2016 7:27 am

If you merely want to remove the extra space in the final string, you could use the following quick-and-dirty workaround:

Code: Select all

list = @wjoin(@wsplit(@wjoin(uniquegroups)))
It's not efficient, but it is concise.
There are rows in my alpha series that are actually blank and I'd like to skip them when gathering unique values.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests