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 (April 2011)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 18 Apr 2011 14:19:47 -0400
Reply-To:     "Tesiny, Ed" <EdTesiny@oasas.state.ny.us>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         "Tesiny, Ed" <EdTesiny@oasas.state.ny.us>
Subject:      Re: Data manipulation in SPSS
Comments: To: Sarah <sarah.e.tarraf@GMAIL.COM>
In-Reply-To:  A<201104181634.p3IE69qG009965@waikiki.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"

Sarah, If the original variable is a string, you could use the SUBSTR function in a compute statement. SUBSTR(a1,a2,a3) A1 - Original string name A2 - begin position A3 - length

Ed Tesiny EdTesiny@oasas.state.ny.us

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Sarah Sent: Monday, April 18, 2011 12:35 PM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Data manipulation in SPSS

Hello all,

Hopefully this question has an easy solution... but I just can't seem to find how to do this.

I have 1 variable that contains 10 numbers, and each position can range from 0 to 3. An example would be....

0113201201

Is there an SPSS function that can separate each position into its own variable (somewhat similar to the 'text to columns' function in Excel)?

My goal would be to have 10 separate variables, keeping with the example above, as:

0 1 1 3 2 0 1 2 0 1

Thanks so much, in advance!

Sarah

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


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