|
Hi,
How is it possible to compute the syntax below in a more effecient way? COMPUTE Monday= (q14_1_1_6=1) OR (q14_2_1_6) OR (q14_2_1_6) OR (q14_3_1_6) OR (q14_4_1_6) OR (q14_5_1_6) OR (q14_6_1_6) OR (q14_7_1_6). COMPUTE Tuesday= (q14_1_2_6=1) OR (q14_2_2_6) OR (q14_2_2_6) OR (q14_3_2_6) OR (q14_4_2_6) OR (q14_5_2_6) OR (q14_6_2_6) OR (q14_7_2_6). COMPUTE Wednesday= (q14_1_3_6=1) OR (q14_2_3_6) OR (q14_2_3_6) OR (q14_3_3_6) OR (q14_4_3_6) OR (q14_5_3_6) OR (q14_6_3_6) OR (q14_7_3_6). COMPUTE Thursday= (q14_1_4_6=1) OR (q14_2_4_6) OR (q14_2_4_6) OR (q14_3_4_6) OR (q14_4_4_6) OR (q14_5_4_6) OR (q14_6_4_6) OR (q14_7_4_6). Many Thanks in advance, Jignesh ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
Sorry there were some error in my origianl syntax. It should have read....
COMPUTE Monx= (q14_1_1_6=1) OR (q14_2_1_6=1) OR (q14_3_1_6=1) OR (q14_4_1_6=1) OR (q14_5_1_6=1) OR (q14_6_1_6=1) OR (q14_7_1_6=1). COMPUTE Tuex= (q14_1_2_6=1) OR (q14_2_2_6=1) OR (q14_3_2_6=1) OR (q14_4_2_6=1) OR (q14_5_2_6=1) OR (q14_6_2_6=1) OR (q14_7_2_6=1). COMPUTE Wedx= (q14_1_3_6=1) OR (q14_2_3_6=1) OR (q14_3_3_6=1) OR (q14_4_3_6=1) OR (q14_5_3_6=1) OR (q14_6_3_6=1) OR (q14_7_3_6=1). COMPUTE Thux= (q14_1_4_6=1) OR (q14_2_4_6=1) OR (q14_3_4_6=1) OR (q14_4_4_6=1) OR (q14_5_4_6=1) OR (q14_6_4_6=1) OR (q14_7_4_6=1). Thanks Jigs On 26/06/2008, J Sutar <[hidden email]> wrote: > > Hi, > > How is it possible to compute the syntax below in a more effecient way? > > > COMPUTE Monday= (q14_1_1_6=1) OR (q14_2_1_6) OR (q14_2_1_6) OR (q14_3_1_6) > OR (q14_4_1_6) OR (q14_5_1_6) OR (q14_6_1_6) OR (q14_7_1_6). > > COMPUTE Tuesday= (q14_1_2_6=1) OR (q14_2_2_6) OR (q14_2_2_6) OR (q14_3_2_6) > OR (q14_4_2_6) OR (q14_5_2_6) OR (q14_6_2_6) OR (q14_7_2_6). > > COMPUTE Wednesday= (q14_1_3_6=1) OR (q14_2_3_6) OR (q14_2_3_6) OR > (q14_3_3_6) OR (q14_4_3_6) OR (q14_5_3_6) OR (q14_6_3_6) OR (q14_7_3_6). > > COMPUTE Thursday= (q14_1_4_6=1) OR (q14_2_4_6) OR (q14_2_4_6) OR > (q14_3_4_6) OR (q14_4_4_6) OR (q14_5_4_6) OR (q14_6_4_6) OR (q14_7_4_6). > > > > Many Thanks in advance, > > Jignesh > ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
Replace things like (q14_1_1_6=1) for the ANY function as in ANY(1,
q14_1_1_6, q14_2_1_6, ... This looks to me like your data are structured to be very wide. Would the VARSTOCASES command simplify things for you? It all depends upon what your goal is. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of J Sutar Sent: Thursday, June 26, 2008 6:35 AM To: [hidden email] Subject: Re: Do Repeat? Do Loop? or Macro? Sorry there were some error in my origianl syntax. It should have read.... COMPUTE Monx= (q14_1_1_6=1) OR (q14_2_1_6=1) OR (q14_3_1_6=1) OR (q14_4_1_6=1) OR (q14_5_1_6=1) OR (q14_6_1_6=1) OR (q14_7_1_6=1). COMPUTE Tuex= (q14_1_2_6=1) OR (q14_2_2_6=1) OR (q14_3_2_6=1) OR (q14_4_2_6=1) OR (q14_5_2_6=1) OR (q14_6_2_6=1) OR (q14_7_2_6=1). COMPUTE Wedx= (q14_1_3_6=1) OR (q14_2_3_6=1) OR (q14_3_3_6=1) OR (q14_4_3_6=1) OR (q14_5_3_6=1) OR (q14_6_3_6=1) OR (q14_7_3_6=1). COMPUTE Thux= (q14_1_4_6=1) OR (q14_2_4_6=1) OR (q14_3_4_6=1) OR (q14_4_4_6=1) OR (q14_5_4_6=1) OR (q14_6_4_6=1) OR (q14_7_4_6=1). Thanks Jigs On 26/06/2008, J Sutar <[hidden email]> wrote: > > Hi, > > How is it possible to compute the syntax below in a more effecient way? > > > COMPUTE Monday= (q14_1_1_6=1) OR (q14_2_1_6) OR (q14_2_1_6) OR (q14_3_1_6) > OR (q14_4_1_6) OR (q14_5_1_6) OR (q14_6_1_6) OR (q14_7_1_6). > > COMPUTE Tuesday= (q14_1_2_6=1) OR (q14_2_2_6) OR (q14_2_2_6) OR > OR (q14_4_2_6) OR (q14_5_2_6) OR (q14_6_2_6) OR (q14_7_2_6). > > COMPUTE Wednesday= (q14_1_3_6=1) OR (q14_2_3_6) OR (q14_2_3_6) OR > (q14_3_3_6) OR (q14_4_3_6) OR (q14_5_3_6) OR (q14_6_3_6) OR (q14_7_3_6). > > COMPUTE Thursday= (q14_1_4_6=1) OR (q14_2_4_6) OR (q14_2_4_6) OR > (q14_3_4_6) OR (q14_4_4_6) OR (q14_5_4_6) OR (q14_6_4_6) OR (q14_7_4_6). > > > > Many Thanks in advance, > > Jignesh > ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
| Free forum by Nabble | Edit this page |
