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 (February 2006)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 7 Feb 2006 13:18:32 -0600
Reply-To:   "Oliver, Richard" <roliver@SPSS.COM>
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:   "Oliver, Richard" <roliver@SPSS.COM>
Subject:   Re: Convert many STRING vars to NUMERIC while keeping labels
Comments:   To: "D. Michaels" <crimdoc@HOTMAIL.COM>
Content-Type:   text/plain; charset="us-ascii"

With SPSS 14 you can use the new programmability extension to identify all string variables and the AUTORECODE command to convert the strings to numeric. AUTORECODE automatically retains the original variable and value labels.

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of D. Michaels Sent: Tuesday, February 07, 2006 1:06 PM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Convert many STRING vars to NUMERIC while keeping labels

Hi all,

I was wondering if anyone has had any success converting all STRING vars in a file to NUMERIC format while retaining the value labels and variable labels after the conversion. I am hoping that there is some simply solution as a "destring" command, but I'm certain this doesn't exist (from what I've reviewed).

I am attempting this conversion on a file which contains both string and numeric variables (approx. 1000 variables in total). I've had some success using various macros from spsstools.net including the varlist macro and a macro which converts ALL string variables between 2 given variables in the data file.

A combination of the two macros accomplishes a portion of the task, but does not retain the variable or value lables. As well, the macros seem to work fine on a small set of variables, but seems to freeze when running it on the entire file. I'm using SPSS 14.0 on a new P4 system with 2 gig of memory which should be sufficient for the task.

Any help or suggestions would be GREATLY appreciated.

Sincerely, D. Michaels


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