LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2006)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 28 Sep 2006 09:59:13 +1000
Reply-To:     Craig Hansen <C.Hansen@uq.edu.au>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Craig Hansen <C.Hansen@uq.edu.au>
Subject:      Add filles and pull apart a string
Content-Type: text/plain; charset="us-ascii"

Hi All

I have to append (eg. add files) two datasets and they have different variables, what would be the most efficient way. Below are examples of the two datasets and the final dataset (how I need it to look).

Dataset 1 Name Age Sex Score1 Smith, John 23 m 14 Jones, Terry 34 m 12 Johns, Tracey 25 f 25

Dataset 2 Firstname Surname Age Sex Score_1 Score_2 Samantha Jones 23 . 12 13 David Smith 34 . 12 24 Timothy Johnson 23 . 12 23

Final dataset Firstname Surname Age Sex Score1 Score2 John Smith 23 m 14 . Terry Jones 34 m 12 . Tracey Johns 25 f 25 . Samantha Jones 23 . 12 13 David Smith 34 . 12 24 Timothy Johnson 23 . 12 23

I need to pull apart the names in dataset1 to create 'Firstname' and 'Surname'. I then need to rename 'Score_1' and 'Score_2' so they are 'Score1' and 'Score2'. The 'Sex' variable in dataset1 is a string and 'Sex' in dataset2 is numeric (even though they are all missing) so I need to change Sex in dataset2 to be a string. The scores are formated differently in each dataset, for example, Score_1 (f6), Score1 (f8).

Thanks in advacne for any help Cheers Craig


Back to: Top of message | Previous page | Main SPSSX-L page