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 (February 2006)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sat, 4 Feb 2006 12:33:47 +0100
Reply-To:     Arnaldo Ferrari Nasi <vs.arni@tiscalinet.it>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Arnaldo Ferrari Nasi <vs.arni@tiscalinet.it>
Subject:      converting dichotomized single choiche response to single choiche
              categories
Content-Type: text/plain; charset="us-ascii"; format=flowed

Hi List,

I have a file with all the variable like this:

data list free/ id q1.1 q1.2 q1.3 q2.1 q2.2. begin data 001 0 0 1 1 0 002 1 0 0 1 0 003 0 1 0 0 1 004 0 0 1 0 1 end data.

I would have a file like this:

data list free/ id q1 q2 begin data 001 3 1 002 1 1 003 2 2 004 3 2 end data.

Obviously, I can do this with a lot of if-statements, but I'd like to know if there is a faster way.

Thanks in advance, Arnaldo.


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