Sorting group members

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

jthodge
Posts: 77
Joined: Tue Oct 21, 2008 5:52 am

Sorting group members

Postby jthodge » Tue Dec 15, 2009 2:27 pm

This is a question regarding Eviews 6.

Is there a command for sorting the group members in a group (i.e. sorting by series name)?
I am combining two groups into a single group and wish to export the data to an Excel file but would like the variables listed in alphabetical order.

For example:
group gp_odd ser01 ser03 ser05
group gp_even ser02 ser04 ser06
group gp_all gp_odd gp_even
write(b2,t=xls,t) "C:\Temp\all_series.xls" gp_all

This outputs the series listed as:
ser01 ser03 ser05 ser02 ser04 ser06
instead of:
ser01 ser02 ser03 ser04 ser05 ser06

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

Re: Sorting group members

Postby EViews Gareth » Tue Dec 15, 2009 4:21 pm

That has me stumped. Can't, at the moment at least, think of a way to do it in EV6.

In EV7, you can use the @wsort command. But that doesn't help you much :(
Follow us on Twitter @IHSEViews

EViews Glenn
EViews Developer
Posts: 2672
Joined: Wed Oct 15, 2008 9:17 am

Re: Sorting group members

Postby EViews Glenn » Thu Dec 17, 2009 11:04 am

Sometimes the hardest questions have the simplest answers :)
The wfsave command will write the Excel file with the series sorted by name...

Code: Select all

wfsave(type=excel) "all_series.xls" gp_all


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 32 guests