Date: Tue, 2 Feb 1999 13:37:00 -0800
Reply-To: jarcuri@EASTBRIDGE.COM
Sender: "SPSSX(r) Discussion" <SPSSX-L@UGA.CC.UGA.EDU>
From: Joe Arcuri <jarcuri@EASTBRIDGE.COM>
Subject: Re: Merging column values into a single new column?
Content-Type: text/plain; charset=US-ASCII
David,
The following syntax should do it for you:
string newvar(a8).
compute newvar=concat( string(var1,f1),
string(var2,f1),string(var3,f1),string(var4,f1),
string(var5,f1),string(var6,f1),ltrim(rtrim(var7)),ltrim(rtrim(var8))).
execute.
Joe Arcuri
Eastbridge Consulting Group
______________________________ Reply Separator _________________________________
Subject: Merging column values into a single new column?
Author: "David M. Fresco" <fresco@CATTELL.PSYCH.UPENN.EDU> at Internet
Date: 2/1/99 8:12 AM
I have 6 single digit numberic (0-9) and two string (A-Z) variables
as consecutive columns in a SPSS 9.0 dataset. Is there some way to
merge all 8 values into a new column? So, if the first case has as
its first 8 columns the values 0 1 2 3 4 5 A B, I would like the new
column to have the value 012345AB. TIA for any suggestions. I would
appreicate an email reply.
Social Phobia Program
ADULT ANXIETY CLINICS OF TEMPLE
Department of Psychology
Temple University Voice: (215) 204-1575
419 Weiss Hall Fax: (215) 204-2155
1701 North 13th Street Email: phobia@blue.temple.edu
Philadelphia, PA 19122 WWW: http://www.temple.edu/phobia
|