LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2007)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 6 Mar 2007 04:37:53 -0800
Reply-To:     Albert-jan Roskam <fomcl@yahoo.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Albert-jan Roskam <fomcl@yahoo.com>
Subject:      Re: Looping and merging syntax support
Comments: To: Richard Ristow <wrristow@mindspring.com>
In-Reply-To:  <7.0.1.0.2.20070306001544.03718340@mindspring.com>
Content-Type: text/plain; charset=iso-8859-1

Alternatively,

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?

Cheers! Albert-Jan

--- Richard Ristow <wrristow@mindspring.com> 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. > > Exactly. > 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 > >Y3. > > LOOP #INDEX = 1 TO 22. > . COMPUTE X(#INDEX) = Y(#INDEX). > END LOOP. >

Cheers! Albert-Jan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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


Back to: Top of message | Previous page | Main SPSSX-L page