Hi Team,
My first post and I need someone to be my SOS. I have file in which I have 300 variables. Each record has unique ID. All I want to do is break the group of varibles into two records with ID being duplicated. For e.g,. row 1 with id x will contain data from from variable 1 to 100 and row two with id x (same id) will contain data from varibles 101 to 300.
From:
ID VAR1 VAR2 ...VAR100...VAR101....VAR300
1 0 ASDF SDFS SDS DDD
To:
ID VAR1 VAR2 ...VAR100...VAR101....VAR300
1 0 ASDF SDFS
1 0 SDS DDD
I really need this thing to be done by tonight. I would highly appreciate your help on this. I am on SPSS 14.
Manmit
|
Administrator
|
Look up XSAVE and ADD FILES in the fine manual. I don't have SPSS on this machine, but I expect it will be something like:
XSAVE OUTFILE = "C:\MyFolder\File1.sav" / keep = ID V1 to V100. XSAVE OUTFILE = "C:\MyFolder\File2.sav" / keep = ID V101 to V300. ADD FILES file = "C:\MyFolder\File1.sav" / file = "C:\MyFolder\File2.sav" / by ID. execute.
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
Administrator
|
Change the second XSAVE to SAVE and you'll be fine.
N.B. XSAVE doesn't read the data so the files don't yet exist at the point of ADD.
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?" |
Free forum by Nabble | Edit this page |