make series name temporary

For questions regarding programming in the EViews programming language.

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

dburtis
Posts: 8
Joined: Fri Feb 20, 2015 11:32 am

make series name temporary

Postby dburtis » Thu Mar 26, 2015 10:09 am

I want to create a temporary series name that exists only within the program but does not become a permanent series name in the workfile.

A simple (and silly) example is in the following program:

smpl 15q1 19q4
series lemp = log(emp)
'lemp is only an intermediate variable used as part of an expression to create another series; I do not want it as part of the workfile
series dlemp=d(lemp)

startz
Non-normality and collinearity are NOT problems!
Posts: 3798
Joined: Wed Sep 17, 2008 2:25 pm

Re: make series name temporary

Postby startz » Thu Mar 26, 2015 10:12 am

On easy thing is to manually delete the series.

Code: Select all

d lemp

dburtis
Posts: 8
Joined: Fri Feb 20, 2015 11:32 am

Re: make series name temporary

Postby dburtis » Thu Mar 26, 2015 10:26 am

yes, i can delete. In real life, i have created a lot of temporary variables by looping. I can delete them at the appropriate place after done using them, but this is extra code that also has to be positioned properly in the program.

startz
Non-normality and collinearity are NOT problems!
Posts: 3798
Joined: Wed Sep 17, 2008 2:25 pm

Re: make series name temporary

Postby startz » Thu Mar 26, 2015 10:52 am

I don't think there is a really good way to do this. (Gareth?) You can create a local subroutine, in which all the created series disappear at the end of the subroutine. But that's not very helpful if you also want to keep quite a few series.
As a kludge, you could do something like name all your temporary series things like temp_x, temp_y and then use a wildcard delete at the end

Code: Select all

d temp_*

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

Re: make series name temporary

Postby EViews Gareth » Thu Mar 26, 2015 12:09 pm

I don't think there is a really good way to do this. (Gareth?) You can create a local subroutine, in which all the created series disappear at the end of the subroutine. But that's not very helpful if you also want to keep quite a few series.
As a kludge, you could do something like name all your temporary series things like temp_x, temp_y and then use a wildcard delete at the end

Code: Select all

d temp_*
That's what I do.

dburtis
Posts: 8
Joined: Fri Feb 20, 2015 11:32 am

Re: make series name temporary

Postby dburtis » Thu Mar 26, 2015 12:14 pm

ok, that is what i will do. Thanks for the advice.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests