sum of all items in a string

For questions regarding programming in the EViews programming language.

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

BT454
Posts: 135
Joined: Wed Aug 02, 2017 6:07 am

sum of all items in a string

Postby BT454 » Mon Oct 29, 2018 8:15 am

Good morning,
Is it possible to code a function that creates a series equal to the sums of all items in a string?
i.e.
if %test = "series1 series2 series3 series4", is there a code so that series x may equal the sum of the contents of %test?
Thanks,
Bob

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

Re: sum of all items in a string

Postby EViews Gareth » Mon Oct 29, 2018 9:43 am

Code: Select all

group g {%test}
series x = @rsum(g)
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 26 guests