Programming a table

For questions regarding programming in the EViews programming language.

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

miorinnovo
Posts: 199
Joined: Sun Mar 01, 2015 5:01 pm

Re: Programming a table

Postby miorinnovo » Thu Feb 01, 2018 2:50 pm

Gareth, you, Sir, are the man.

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

Re: Programming a table

Postby EViews Gareth » Thu Feb 01, 2018 3:14 pm

Beer donations can be sent to support@eviews.com :D
Follow us on Twitter @IHSEViews

miorinnovo
Posts: 199
Joined: Sun Mar 01, 2015 5:01 pm

Re: Programming a table

Postby miorinnovo » Fri Feb 02, 2018 2:20 pm

Here's another table question.

I was hoping to have the first column in my table be the names in my for string. But if I put {%string} in brackets to tell the table to read it It just displays {%string}. Is there a workaround for this?

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

Re: Programming a table

Postby EViews Gareth » Fri Feb 02, 2018 2:40 pm

Don't follow.
Follow us on Twitter @IHSEViews

miorinnovo
Posts: 199
Joined: Sun Mar 01, 2015 5:01 pm

Re: Programming a table

Postby miorinnovo » Fri Feb 02, 2018 3:05 pm

Here's the code

Code: Select all

for %names a b c d e f
   !row = !row + 1
   {%table}(!row,1) = "{%names}"
   {%table}(!row,2) = @mean({%names}{%somethingelse})


So I was hoping to get the first column to be rows that say "a" then next row says "b" etc. But they all just actually say {%names}.

also I want the second column to give me the mean of a{%somethingelse}

Thanks

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

Re: Programming a table

Postby EViews Gareth » Fri Feb 02, 2018 3:16 pm

Code: Select all

{%table}(!row,1) = %names
Follow us on Twitter @IHSEViews

miorinnovo
Posts: 199
Joined: Sun Mar 01, 2015 5:01 pm

Re: Programming a table

Postby miorinnovo » Fri Feb 02, 2018 3:22 pm

ok, that one hurt.
thanks

JimForest
Posts: 83
Joined: Thu Oct 16, 2008 7:53 pm
Location: MA

Re: Programming a table

Postby JimForest » Mon Jan 28, 2019 2:23 pm

I want to freeze and rename, can it be done in two lines?

equation eq6.ls(optmethod=opg) depvar c
freeze eq6.ls equation1

(and rename it as a table called equation1)

When I run above it won't accept the name. I get an error when I run RENAME in a separate line.

I am sure this is very simple.

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

Re: Programming a table

Postby EViews Gareth » Mon Jan 28, 2019 6:17 pm

Code: Select all

freeze(equation1) eq6.ls
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 25 guests