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:         Wed, 1 Feb 2006 08:40:43 -0500
Reply-To:     Michael Kruger <aa3657@wayne.edu>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Michael Kruger <aa3657@wayne.edu>
Subject:      Re: Deconcatenating one variable into seven variables
Comments: To: theoriv@gmail.com
In-Reply-To:  <e59170860601311313m774b2107y315e531de5c67ef0@mail.gmail.com>
Content-Type: text/plain; charset=us-ascii; format=flowed

I just did the same thing with several hundred names that had to be broken down into their individual letters.

First create seven string variables: R1 to R7, then uses the function SUBSTR(variable,1,1) through SUBSTR(variable,7,1) to get the seven individual values.

For instance: Create the seven string variables, R1 to R7 COMPUTE R1=substr(value,1,1). COMPUTE R2=substr(value,2,1). ... ... ... ... COMPUTE R7=substr(value,7,1).

This should work and requires minimal programming.

MK

>> >> >> > > >

-- Michael Kruger "A True Prince" Statistical Analyst C.S. Mott Center Dept. of OB/GYN Wayne State University School of Medicine (313)-577-1794


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