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 (April 2010)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 9 Apr 2010 22:02:46 +0200
Reply-To:     John F Hall <johnfhall@orange.fr>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         John F Hall <johnfhall@orange.fr>
Subject:      Re: Adding a prefix to all variable names
Comments: To: Derek Quinlan <derek.james.quinlan@gmail.com>
Content-Type: multipart/alternative;

Another trick if you haven't got too many variables would be to use rename for all the vars in one file, then merge them. A lot easier if they all begin with v.... and you use positional variable names. Not sure if you can do it it Word, but (for the British Social Attitudes series)I used to use EDT on the Vax in column mode and strip out columns to convert mnemonics to positional names (which are far easier to use with the questionnaire) and also to reverse the rename for users who prefer mnemonics. I don't have the original syntax from 1986, but here's an example from the 2002 European Social Survey (copied from a slide so the colours are funny) Only trouble is, to change back, the original variable names have to be listed in full!

rename variables (tvtot to pplhlp = a1 to a10) (dscrrce to dscroth = c17_1 to c17_10) (dscrdk to dscrna = c17_dk, c17_ref, c17_nap, c17_na)

----- Original Message ----- From: Derek Quinlan To: SPSSX-L@LISTSERV.UGA.EDU Sent: Friday, April 09, 2010 4:59 PM Subject: Adding a prefix to all variable names

Hi All,

I have two datasets that I would like to combine (i.e. using the add variables merge). Most of the variable names are common between the datasets.

I would like to add a prefix to each dataset prior to merging that would allow me to get past the repeating variable name problem.

Is there an easy way to do this? Or am I stuck manually adding the prefixes to 800+ variable names?

Derek

-- Dr. Derek J. Quinlan Research Project Coordinator Psychology Lecturer University of Western Ontario London, Ontario

Mailing Address: Dr. Derek J. Quinlan The University of Western Ontario Westminster Hall, Suite 326E London, ON N6A 3K7


[text/html]


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