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 [hidden email] (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 |
Administrator
|
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.
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
Thanks very much!
(I gave up on the help too early -- after searching only for "value labels" and not finding it in the top results) Eszter -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Weaver Sent: 12 May 2011 13:26 To: [hidden email] Subject: Re: value labels to a string variable 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 > [hidden email] (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 [hidden email] 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 [hidden email] (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 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 [hidden email] (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 |
Free forum by Nabble | Edit this page |