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