Date: Wed, 31 Aug 2005 14:13:28 +0200
Reply-To: Spousta Jan <JSpousta@CSAS.CZ>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Spousta Jan <JSpousta@CSAS.CZ>
Subject: Re: partioning of string variable to distincet one
Content-Type: text/plain; charset="us-ascii"
Hi Khaled,
e.g. this way:
data list free / q1 (A10).
begin data.
a
a
ab
ac
a
b
c
ac
abc
end data.
do repe x = qa qb qc / y = "a" "b" "c" .
- compute x = index(q1, y) > 0.
end repe.
exe.
form qa qb qc (f1).
Greetings
Jan
________________________________
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of
Khaled El Ghareni
Sent: Wednesday, August 31, 2005 2:01 PM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: partioning of string variable to distincet one
Dear Listers ,I have multiple answer string Q's like this one
Q1
a
a
ab
ac
a
b
c
ac
abc
how to convert it to Qa Qb Qc
1 0 0
1 0 0
1 1 0
1 0 1
1 0 0
0 1 0
0 0 1
1 0 1
1 1 1
Regards
Khaled