VALUE LABELS option in LIST, PRINT and WRITE

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

VALUE LABELS option in LIST, PRINT and WRITE

spruce18b
I can't find an option in LIST, PRINT, or WRITE to output value labels in place of values. For example, with these procedures,  in outputting the variables id, sex and drink, instead of

0001       1     3

I want

0001       male     beer

Thanks, Bill
Reply | Threaded
Open this post in threaded view
|

Re: VALUE LABELS option in LIST, PRINT and WRITE

Anthony Babinec
Look at the VALUELABEL function. Below is an example from SPSS Help.
Since the contents of labelvar are a string variable, you must first declare
labelvar on the STRING command.

VALUELABEL function
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.


Tony Babinec
[hidden email]


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
spruce18b
Sent: Friday, March 18, 2011 1:24 PM
To: [hidden email]
Subject: VALUE LABELS option in LIST, PRINT and WRITE

I can't find an option in LIST, PRINT, or WRITE to output value labels in
place of values. For example, with these procedures,  in outputting the
variables id, sex and drink, instead of

0001       1     3

I want

0001       male     beer

Thanks, Bill


--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/VALUE-LABELS-option-in-LIST-PR
INT-and-WRITE-tp3976236p3976236.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

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: VALUE LABELS option in LIST, PRINT and WRITE

Jon K Peck
In reply to this post by spruce18b
You can do this with SAVE TRANSLATE writing to a text file in various formats: /CELLS=LABELS.

Jon Peck
Senior Software Engineer, IBM
[hidden email]
312-651-3435




From:        spruce18b <[hidden email]>
To:        [hidden email]
Date:        03/18/2011 12:26 PM
Subject:        [SPSSX-L] VALUE LABELS option in LIST, PRINT and WRITE
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




I can't find an option in LIST, PRINT, or WRITE to output value labels in
place of values. For example, with these procedures,  in outputting the
variables id, sex and drink, instead of

0001       1     3

I want

0001       male     beer

Thanks, Bill


--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/VALUE-LABELS-option-in-LIST-PRINT-and-WRITE-tp3976236p3976236.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

Reply | Threaded
Open this post in threaded view
|

Re: VALUE LABELS option in LIST, PRINT and WRITE

Bruce Weaver
Administrator
In reply to this post by spruce18b
Take a look at REPORT (under Analyze - Reports in the GUI).


spruce18b wrote
I can't find an option in LIST, PRINT, or WRITE to output value labels in place of values. For example, with these procedures,  in outputting the variables id, sex and drink, instead of

0001       1     3

I want

0001       male     beer

Thanks, Bill
--
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/).