Date: Tue, 6 Mar 2007 04:37:53 -0800
Reply-To: Albert-jan Roskam <firstname.lastname@example.org>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Albert-jan Roskam <email@example.com>
Subject: Re: Looping and merging syntax support
Content-Type: text/plain; charset=iso-8859-1
do repeat #x = x1 to x22 / #y = y1 to x22.
compute #x = #y.
end repeat print.
Maybe I had too much coffee today, but wouldn't a
simple RENAME VARIABLES also do what you want?
--- Richard Ristow <firstname.lastname@example.org> wrote:
> At 10:24 PM 3/5/2007, Manmit Shrimali wrote:
> >1. Create a vector that contains information of
> variable X1 to X22.
> >Variables are in order. So I believe I will write
> vector X=X1 to X22.
> VECTOR X=X1 TO X22.
> >2. Create another vector that contains information
> of variable Y1 to
> >Y22 so it will be vector Y=Y1 to Y22.
> Again, exactly:
> VECTOR Y=Y1 TO Y22.
> >3. In every cell cell of X I want to inpute value
> of Y i.e. X1 should
> >have value of Y1, X2 should have value of Y2, X3
> should have value of
> LOOP #INDEX = 1 TO 22.
> . COMPUTE X(#INDEX) = Y(#INDEX).
> END LOOP.
Did you know that 87.166253% of all statistics claim a precision of results that is not justified by the method employed? [HELMUT RICHTER]
Need a quick answer? Get one in minutes from people who know.
Ask your question on www.Answers.yahoo.com