I would like to reorder (28) variables into cases like that:
V1 V2 V3 V4 W1 W2 W3 W4 into: v1 w1 v2 w2 v3 w3 v4 w4 Seems to be rather simple with vars to cases, however do not find the solution (got mixed up with "target variable" and "fixed variable(s)"
Dr. Frank Gaeth
|
Administrator
|
Frank,
All that is required (assuming you aren't holding back info) is two MAKE subcommands.
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
I would do the following: v1 w1 v2 w2 v3 w3 v4 w4 ... 2013/5/3 David Marso [via SPSSX Discussion] <[hidden email]> Frank, |
In reply to this post by David Marso
As an example, this would be the original file:
*------------- original file ------------------------. DATA LIST FREE / v1 v2 v3 v4 w1 w2 w3 w4. BEGIN DATA. 1 2 3 4 11 22 33 44 1 2 3 4 11 22 33 44 1 2 3 4 11 22 33 44 END DATA. EXECUTE. and this should be the outcome: *------------ result --------------------------------. DATA LIST FREE / v w. BEGIN DATA. 1 11 2 22 3 33 4 33 1 11 2 22 3 33 4 33 1 11 2 22 3 33 4 33 END DATA. EXECUTE.
Dr. Frank Gaeth
|
Administrator
|
So what have you tried Frank?
I posted a hint this AM which if you pursue will result in a happy ending! --
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
David, do you suggest a paper chase?
Dr. Frank Gaeth
|
Administrator
|
Not sure what that is.
Let's see, manuals used to be made of paper (let's pretend). Sometimes you just need to try things! data list list / v1 v2 v3 v4 w1 w2 w3 w4. begin data 11 12 13 14 15 16 17 18 21 22 23 24 25 26 27 28 end data. VARSTOCASES MAKE v FROM V1 TO v4 / MAKE w FROM w1 TO w4. You want fries or onion rings with that? --
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Beer chaser, perhaps? :-) On Fri, May 3, 2013 at 6:10 PM, David Marso <[hidden email]> wrote: Not sure what that is. |
Administrator
|
Make mine a 30 yr old Laphroaig.
Frank's buying! -
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Beer chaser?
In a 2011 exchange about the late Cathie Marsh with Charles Turner (Study Director of the National Research Council Panel Survey Measurement of Subjective Phenomena) wrote, "You should also know that I am very partial to websites that open with a picture of their creator sipping (or chugging) a beer; see http://dragon.soc.qc.cuny.edu/Staff/turner/cfturner.htm" I was going to change the photo on my home page, but now I think I'll keep it. Any more "chuggers" out there? John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com Start page: www.surveyresearch.weebly.com/spss-without-tears.html -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of David Marso Sent: 04 May 2013 00:35 To: [hidden email] Subject: Re: VarsToCases Make mine a 30 yr old Laphroaig. Frank's buying! - Ryan Black wrote > Beer chaser, perhaps? :-) > > > On Fri, May 3, 2013 at 6:10 PM, David Marso < > david.marso@ > > wrote: > >> Not sure what that is. >> Let's see, manuals used to be made of paper (let's pretend). >> Sometimes you just need to try things! >> >> data list list / v1 v2 v3 v4 w1 w2 w3 w4. >> begin data >> 11 12 13 14 15 16 17 18 >> 21 22 23 24 25 26 27 28 >> end data. >> VARSTOCASES MAKE v FROM V1 TO v4 / MAKE w FROM w1 TO w4. >> >> You want fries or onion rings with that? >> -- >> >> >> drfg2008 wrote >> > David, do you suggest a paper chase? >> >> >> >> >> >> ----- >> Please reply to the list and not to my personal email. >> Those desiring my consulting or training services please feel free to >> email me. >> --- >> "Nolite dare sanctum canibus neque mittatis margaritas vestras ante >> porcos ne forte conculcent eas pedibus suis." >> Cum es damnatorum possederunt porcos iens ut salire off sanguinum >> cliff in abyssum?" >> -- >> View this message in context: >> http://spssx-discussion.1045642.n5.nabble.com/VarsToCases-tp5719909p5 >> 719941.html Sent from the SPSSX Discussion mailing list archive at >> Nabble.com. >> >> ===================== >> To manage your subscription to SPSSX-L, send a message to >> > LISTSERV@.UGA > (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 >> ----- Please reply to the list and not to my personal email. Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/VarsToCases-tp5719909p5719944. html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== 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 |
Administrator
|
Can't chug this one!
Imperial Pumpkin Ale (6 months to make, terrible mess with sediment).
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
In reply to this post by drfg2008
Hi Dr. Gaeth, I recomend you do this: Varstocases Regards. El 03/05/2013 08:15, "drfg2008" <[hidden email]> escribió:
I would like to reorder (28) variables into cases like that: |
Thank you Sergio! Yes, that works.
David had already written: VARSTOCASES MAKE v FROM V1 TO v4 / MAKE w FROM w1 TO w4. before he started looking deeply into a beer glass. Well, a matter of taste. Whereas Carlos' example (MATCH FILE FILE=* ) just sorts the data in a different order. Thank you also!
Dr. Frank Gaeth
|
Free forum by Nabble | Edit this page |