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 (March 1997)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 28 Mar 1997 12:54:48 -0800
Reply-To:   hmaletta@overnet.com.ar
Sender:   "SPSSX(r) Discussion" <SPSSX-L@UGA.CC.UGA.EDU>
From:   "Hector E. Maletta" <hmaletta@OVERNET.COM.AR>
Subject:   Re: concatenating numeric variables
Comments:   To: Verified <grk3@CORNELL.EDU>
Content-Type:   text/plain; charset=us-ascii

Gonzalo, try this: compute item3=10*item1+item2.

Hector Maletta Universidad del Salvador Buenos Aires, Argentina

Gonzalo Kmaid wrote: > > In article <saccojos-ya023480002703970035290001@news.msu.edu>, > saccojos@pilot.msu.edu says... > >hi, > >I have two variables, say, item1 and item2 and want to create a third > >variable item3 that is a concatentation of item1 and item2. e.g., if > >item1=2 and item2=6 then item3=26 without using if then statements. any > >ideas? > >>please respond via email as well as by post. > >thanks. > > A somewhat ineficient way to this is to create "duplicates" of the numeric > variables but as string ones (using compute and the 'string' function), then > concatenate them using the 'concatenate' function in a compute statement, > and then creating a numeric variable from the string-concatenated-variable > (using the 'number' function in a compute statement)...for sure there is a > more elegant way to do this...any additional help? :-):-) > > Gonzalo Kmaid > > -- > Field of Development Sociology > Cornell University > Ithaca, New York 14853


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