Date: Wed, 5 Jun 2002 10:49:02 -0300
Reply-To: Marcos Sanches <firstname.lastname@example.org>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Marcos Sanches <email@example.com>
Subject: Re: coding (quick help? Thanks!!)
Content-Type: text/plain; charset="iso-8859-1"
If you want to code cases based on two positions of a string variables, you
IF (SUBSTR(v1,7,1) = "1" and SUBSTR(v1,4,1) = "1" ) codevar=1.
IF (SUBSTR(v1,7,1) = "1" and SUBSTR(v1,4,1) = "2" ) codevar=2.
I don't know if I understood your problem,
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of
Sent: Tuesday, June 04, 2002 6:49 PM
Subject: coding (quick help? Thanks!!)
Can anyone kindly help me with the following problem:
I have been trying to use syntax to encode my data. In the usual case, I
know how to do it. For example,
IF (SUBSTR(v1,7,1) = "1") REPETITION=rep1. (if the seventh character in the
name string contaiins the number 1, encode it under the variable repetition
Now, my problem is: there are certain cases the specific encoding has to be
dependent on two characters rather than 1. For example, I have these two
file names which only differ in the 4th character:
But I need to encode the d as two different categories under the same
variable. Hypothetically speaking, when it is "d1", it is da and when it
is "d2", it is di under the same variable "word".
Can anyone kindly advise me what I should do? Very big thanks!!
Do You Yahoo!?
Sign-up for Video Highlights of 2002 FIFA World Cup