Making list of looped graph names

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

Karl1
Posts: 27
Joined: Tue Aug 27, 2013 1:10 am

Making list of looped graph names

Postby Karl1 » Wed Aug 28, 2013 3:12 am

I wish to merge several graphs that have loop-references in the names. Example
GRAPH_{%str2}_{%str1} is a graph name. Here str2 is a scenario and str1 is the variable name.

From the thread http://forums.eviews.com/viewtopic.php? ... 492#p19938I understand that I have to build a list of the graph names. The loop suggested for "grnames" in the thread seems to assume that each graph-name must end by a number. This is not the situation for me, as the graph names do not end by a number. To specify: How to create List_{%str2} = (GRAPH_{%str2}_{%str1} ), where the number of elements in List_{%str2} = the number of elements in str1 and where {%str2} and {%str1} in the list equals the actuall element in str2 and str1 (and not the number)?

I understand if this was difficult to understand, so just ask if there is something unclear!

Karl1
Posts: 27
Joined: Tue Aug 27, 2013 1:10 am

Re: Making list of looped graph names

Postby Karl1 » Wed Aug 28, 2013 5:02 am

I think I made it with the code below.
Example of a graph name: "graph_%str2_inf", where "inf" is gr5.@seriesnam(1) in the code below.

Code: Select all

group gr5 inf wcinf uaku rl infjae pbgr ygr rexr rrl depr rsh crgr !n1 = gr5.@count %grnames = "" for !loop = 1 to !n1 %grnames = %grnames + " " + "graph_" + %str2 + "_" + gr5.@seriesname(!loop) next graph graph_merge.merge {%grnames} next


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 1 guest