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 (March 2011)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 2 Mar 2011 20:44:07 -0800
Reply-To:     spruce18b <>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         spruce18b <>
Subject:      Re: Stripping off attributes: Variable labels in a vector loop
In-Reply-To:  <>
Content-Type: text/plain; charset=us-ascii

I know that removing the attributes of variables removes meaning from the data. My objective is to present my students with a naked file and to ask them to add the variable labels, value labels, missing values and other attributes so that they will understand what is required to make a data file understandable.

It took only a couple of minutes for me in the Variable View View window to remove the variable labels. I want to know how to remove them with syntax.

Below is my code. The value labels have been repeated for the string variables because they vary in width. My main query concerns the loop with the vector. Please note that the variable labels have not been removed, as shown in the output from DISPLAY LABELS command, and that a rogue variable named v has a variable label of "(#I) ' '".

get file='c:\data\spss\ckcs220\sdatac19.sav'. value labels course. value labels facultid. value labels q17prog. value labels id to surveyc q01a to q16age q18coop to q25comut. missing values id to surveyc q01a to q16age q18coop to q25comut ().

string v (A10). VECTOR V=id to surveyc. LOOP #I=1 TO 3. VAR LABELS V(#I) ' '. END LOOP.

display labels.

Output folllws:

Variable Labels Variable Position Label id 1 Student ID location 2 Project Location surveyc 3 Survey Category

... Many lines omitted ...

v 41 (#I) ' '

-- View this message in context: Sent from the SPSSX Discussion mailing list archive at

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (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

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