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 (May 2011)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 12 May 2011 04:25:40 -0700
Reply-To:     Bruce Weaver <bruce.weaver@hotmail.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Bruce Weaver <bruce.weaver@hotmail.com>
Subject:      Re: value labels to a string variable
In-Reply-To:  <E42C9D5F9B09444B99201DED8EF7C4950407D8DC55@exchng37.centeur.gallup.com>
Content-Type: text/plain; charset=us-ascii

From the Help:

VALUELABEL. VALUELABEL(varname). String. Returns the value label for the value of variable or an empty string if there is no label for the value. The value of varname must be a variable name; it cannot be an expression.

Example STRING labelvar (A120). COMPUTE labelvar=VALUELABEL(var1). DO REPEAT varlist=var2, var3, var4 /newvars=labelvar2, labelvar3, labelvar4. - STRING newvars(A120). - COMPUTE newvars=VALUELABEL(varlist). END REPEAT.

HTH.

Csernai, Eszter wrote: > > Dear List, > > I am sure there is a way to create a string variable from the value labels > of another variable in syntax instead of displaying the dictionary and > writing the labeling syntax using that. > Any suggestions how to do this? > > Thanks very much, > Eszter > > > IMPORTANT NOTICE: This e-mail message and all attachments, if any, may > contain confidential and privileged material and are intended only for the > person or entity to which the message is addressed. If you are not an > intended recipient, you are hereby notified that any use, dissemination, > distribution, disclosure, or copying of this information is unauthorized > and strictly prohibited. If you have received this communication in error, > please contact the sender immediately by reply e-mail, and destroy all > copies of the original message. > > ===================== > 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 >

----- -- Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.

-- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/value-labels-to-a-string-variable-tp4389927p4389983.html Sent from the SPSSX Discussion mailing list archive at Nabble.com.

===================== 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