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 (May 2004)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 21 May 2004 18:57:56 -0400
Reply-To:   Raynald Levesque <rlevesque@videotron.ca>
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:   Raynald Levesque <rlevesque@videotron.ca>
Subject:   Re: keeping common values
In-Reply-To:   <00B62E9041564841AB5D7EADBBB5184A1FCDE1@EXCH4.intranet.local>
Content-type:   text/plain; charset=iso-8859-1

Hi

The question is a few different interpretation. Does this meet your nned?

DATA LIST LIST /PRIA PRIB. BEGIN DATA 1 1 2 2 3 3 4 4 5 5 6 6 7 7 . 8 . 9 END DATA.

COMPUTE pric=pria*(pria=prib). EXECUTE.

Regards

Raynald Levesque rlevesque@videotron.ca Visit my SPSS site: http://pages.infinit.net/rlevesqu/

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of <Bertin Dadaille> Sent: May 21, 2004 5:48 PM To: SPSSX-L@LISTSERV.UGA.EDU Subject: keeping common values

Does anyone can help me I have a file with 7 variables. 2 of those variables have a lot of identical value . Let say: PRIA PRIB 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 9 I want to keep only as a new variable (PRIC) the values which are in PRIA and PRIB. (1,2,3,4,5,6,7) Thank you

Bertin Dadaille Research Officer | Agent de recherche Compensation Planning Division | Division de la planification de la rémunération Human Resources Management Office | Bureau de la gestion des ressources humaines Treasury Board of Canada, Secretariat | Secrétariat du Conseil du Trésor du Canada Ottawa, Canada K1A 0R5 613-957-8290 | Dadaille.Bertin@tbs-sct.gc.ca | facsimile/télécopieur 613-957-0425

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Hetter, Rebecca D,,DMDCWEST Sent: May 20, 2004 3:58 PM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Re: Restructuring data

This might do it (untested syntax):

save outfile temp1/drop= v4 v5 v6. save outfile temp2/drop= v1 v2 v3/ren=(v4 v5 v6=v1 v2 v3). add files file=temp1/file=temp2 .

If you need to maintain the original order of the records, then try this:

compute seqno=$casenum. compute recno= 1. save outfile temp1/drop= v4 v5 v6. compute recno= 2. save outfile temp2/drop= v1 v2 v3/ren=(v4 v5 v6=v1 v2 v3). add files file=temp1/file=temp2/by seqno recno.

HTH,

Becky Hetter

-----Original Message----- From: Henrik Clausen [mailto:clausen@wilke.dk] Sent: Thursday, May 20, 2004 12:07 PM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Restructuring data

I have some data in the following form:

v1 v2 v3 v4 v5 v6 1 x1 y1 z1 x2 y2 z2 2 x3 y3 z3 x4 y4 z4 3 and so on

I would like the data to be restructured into the following way:

v1 v2 v3 1 x1 y1 z1 2 x2 y2 z2 3 x3 y3 z3 4 x4 y4 z4

I've tried to use the restructure function in spss 12.0 but with little success - maybe because I'm using it the wrong way. I have a lot of columns and rows so a syntax would be appreciated..

Thanks Henrik

Med venlig hilsen / Kind Regards Henrik Kjærgaard Clausen

E-mail: clausen@wilke.dk URL: http://www.wilke.dk/ <http://www.wilke.dk/> Telefon: +45 70 10 20 80 Fax: +45 70 10 20 81

Wilke A/S Vindegade 53, 1. DK-5000 Odense

*****************************

This message contains privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that you must not disseminate, copy or take any action in reliance on it. If you have received this message in error please notify Wilke A/S immediately.

*****************************


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