Page 1 of 1
Copy Command Options
Posted: Tue Jun 07, 2011 9:00 am
by modelmaker
I have two questions regarding the 'copy' command:
(1) When I copy series between pages, the 'link' option doesn't appear to work:
Code: Select all
copy(link) annual\series1 quarterly\series1
(2) I am having trouble getting the 'smpl' option to work. The copy command seems to automatically merge any available data within the workfile range:
Code: Select all
copy(m,smpl="1970 2009") db1::series2 wf::series2
Thanks.
Re: Copy Command Options
Posted: Tue Jun 07, 2011 9:07 am
by EViews Gareth
The link option is for creating database links, not links between pages. Use a link object if you want to create a link between two pages.
I'm not sure if the smpl option works when copying from a database.
Re: Copy Command Options
Posted: Wed Jun 08, 2011 11:26 am
by modelmaker
With regard to the "smpl" option, I tried the following code:
Code: Select all
series series1
fetch(c=nu,d=db1) series2
copy(m,smpl="1971Q1 1990Q4") wf::series2 wf::series1
Even when copying within the same workfile page, the "smpl" option doesn't seem to work. Everything in series2 gets copied into series1. Any suggestions?
(Forgot to mention - I'm using EViews 7 Enterprise Edition.)
Re: Copy Command Options
Posted: Wed Jun 08, 2011 11:37 am
by EViews Gareth
Seems to work for me:
Code: Select all
wfcreate(page=page1) m 1990 2010
series y=nrnd
pagecreate(page=page2) m 1990 2010
copy(smpl="1993 1995") page1\y page2\y
show y
Re: Copy Command Options
Posted: Wed Jun 08, 2011 12:30 pm
by modelmaker
Your code works, but why doesn't this code work?:
Code: Select all
wfcreate(page=page1) m 1990 2010
series y=db::lr
series z
copy(m,smpl="1993 1995") y z
show z
Re: Copy Command Options
Posted: Wed Jun 08, 2011 1:13 pm
by EViews Gareth
The copy command isn't really meant for copying series into the same page. You can use simple = assignment to do that: