|
Hi all,
This is probably an easy question. Is there any way to remove individual value labels from a variable while keeping other value labels intact? Thanks in advance, Mark ====================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 |
|
Try the Add Value Labels Command, which can also remove labels if you specify values without corresponding labels, as in:
data list free /x. begin data 1 2 3 4 end data. value labels x 1 'one' 2 'two' 3 'three' 4 'four'. display dictionary. add value lables x 4. display dictionary. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mark.W.Andrews Sent: Monday, October 06, 2008 3:12 PM To: [hidden email] Subject: Removing Value Labels Hi all, This is probably an easy question. Is there any way to remove individual value labels from a variable while keeping other value labels intact? Thanks in advance, Mark ======= 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 |
|
In reply to this post by Mark.W.Andrews-2
If you need to remove more than one value label for the same variable, use null strings for the labels:
data list free /x. begin data 1 2 3 4 end data. value labels x 1 'one' 2 'two' 3 'three' 4 'four'. display dictionary. add value lables x 3 "" 4 "". display dictionary. -----Original Message----- From: Oliver, Richard Sent: Monday, October 06, 2008 4:14 PM To: 'Mark.W.Andrews'; [hidden email] Subject: RE: Removing Value Labels Try the Add Value Labels Command, which can also remove labels if you specify values without corresponding labels, as in: data list free /x. begin data 1 2 3 4 end data. value labels x 1 'one' 2 'two' 3 'three' 4 'four'. display dictionary. add value lables x 4. display dictionary. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mark.W.Andrews Sent: Monday, October 06, 2008 3:12 PM To: [hidden email] Subject: Removing Value Labels Hi all, This is probably an easy question. Is there any way to remove individual value labels from a variable while keeping other value labels intact? Thanks in advance, Mark ======= 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 |
|
Richard,
Thanks, I was trying this before but both methods don't seem to remove the actual value label (at least from the variable view). The label stays visible but is defined by the null strings. Maybe I am using another version (v15). Mark -----Original Message----- From: Oliver, Richard [mailto:[hidden email]] Sent: Monday, October 06, 2008 5:18 PM To: Oliver, Richard; Mark.W.Andrews; [hidden email] Subject: RE: Removing Value Labels If you need to remove more than one value label for the same variable, use null strings for the labels: data list free /x. begin data 1 2 3 4 end data. value labels x 1 'one' 2 'two' 3 'three' 4 'four'. display dictionary. add value lables x 3 "" 4 "". display dictionary. -----Original Message----- From: Oliver, Richard Sent: Monday, October 06, 2008 4:14 PM To: 'Mark.W.Andrews'; [hidden email] Subject: RE: Removing Value Labels Try the Add Value Labels Command, which can also remove labels if you specify values without corresponding labels, as in: data list free /x. begin data 1 2 3 4 end data. value labels x 1 'one' 2 'two' 3 'three' 4 'four'. display dictionary. add value lables x 4. display dictionary. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mark.W.Andrews Sent: Monday, October 06, 2008 3:12 PM To: [hidden email] Subject: Removing Value Labels Hi all, This is probably an easy question. Is there any way to remove individual value labels from a variable while keeping other value labels intact? Thanks in advance, Mark ======= 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 |
|
please give more detail about what you would like to do? What are you
trying to accomplish? Art Kendall Social Research Consultants Mark.W.Andrews wrote: > Richard, > > Thanks, I was trying this before but both methods don't seem to remove > the actual value label (at least from the variable view). The label > stays visible but is defined by the null strings. > > Maybe I am using another version (v15). > > Mark > > -----Original Message----- > From: Oliver, Richard [mailto:[hidden email]] > Sent: Monday, October 06, 2008 5:18 PM > To: Oliver, Richard; Mark.W.Andrews; [hidden email] > Subject: RE: Removing Value Labels > > > If you need to remove more than one value label for the same variable, > use null strings for the labels: > > data list free /x. > begin data > 1 2 3 4 > end data. > value labels x 1 'one' 2 'two' 3 'three' 4 'four'. > display dictionary. > add value lables x 3 "" 4 "". > display dictionary. > > -----Original Message----- > From: Oliver, Richard > Sent: Monday, October 06, 2008 4:14 PM > To: 'Mark.W.Andrews'; [hidden email] > Subject: RE: Removing Value Labels > > Try the Add Value Labels Command, which can also remove labels if you > specify values without corresponding labels, as in: > > data list free /x. > begin data > 1 2 3 4 > end data. > value labels x 1 'one' 2 'two' 3 'three' 4 'four'. > display dictionary. > add value lables x 4. > display dictionary. > > -----Original Message----- > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of > Mark.W.Andrews > Sent: Monday, October 06, 2008 3:12 PM > To: [hidden email] > Subject: Removing Value Labels > > Hi all, > > > > This is probably an easy question. Is there any way to remove individual > value labels from a variable while keeping other value labels intact? > > > > Thanks in advance, > > > > Mark > > > > > > > > ======= > 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 > > > ===================== 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
Art Kendall
Social Research Consultants |
|
It sound more like you want to remove specific values from the dictionary.
Two thoughts. 1) if you have have a lot of variables to work on and have the value label syntax you used to create the file, save the file as it is. Edit that syntax so zero is not a labeled value. Get the file you just saved, apply the syntax, and save with a new name. 2) manually remove that value from the variable view. Art Kendall Social Research Consultants Mark.W.Andrews wrote: > Hi, > > It's more of esthetics than anything. I want to clear out a value label. > We recoded all "other" responses that were previously coded as zero. We > want to clear out the value label for 0. > > I can clear out the value label in the manners Richard suggested, but it > still appears in the variable view with a designated value of null (""). > This might not have any impact on the processing and analysis of data > (especially since nothing is coded 0), but it looks sloppy and the data > is a client deliverable. > > Mark > > -----Original Message----- > From: Art Kendall [mailto:[hidden email]] > Sent: Tuesday, October 07, 2008 7:43 AM > To: Mark.W.Andrews > Cc: [hidden email] > Subject: Re: Removing Value Labels > > > please give more detail about what you would like to do? What are you > trying to accomplish? > > Art Kendall > Social Research Consultants > > Mark.W.Andrews wrote: > >> Richard, >> >> Thanks, I was trying this before but both methods don't seem to remove >> the actual value label (at least from the variable view). The label >> stays visible but is defined by the null strings. >> >> Maybe I am using another version (v15). >> >> Mark >> >> -----Original Message----- >> From: Oliver, Richard [mailto:[hidden email]] >> Sent: Monday, October 06, 2008 5:18 PM >> To: Oliver, Richard; Mark.W.Andrews; [hidden email] >> Subject: RE: Removing Value Labels >> >> >> If you need to remove more than one value label for the same variable, >> use null strings for the labels: >> >> data list free /x. >> begin data >> 1 2 3 4 >> end data. >> value labels x 1 'one' 2 'two' 3 'three' 4 'four'. >> display dictionary. >> add value lables x 3 "" 4 "". >> display dictionary. >> >> -----Original Message----- >> From: Oliver, Richard >> Sent: Monday, October 06, 2008 4:14 PM >> To: 'Mark.W.Andrews'; [hidden email] >> Subject: RE: Removing Value Labels >> >> Try the Add Value Labels Command, which can also remove labels if you >> specify values without corresponding labels, as in: >> >> data list free /x. >> begin data >> 1 2 3 4 >> end data. >> value labels x 1 'one' 2 'two' 3 'three' 4 'four'. >> display dictionary. >> add value lables x 4. >> display dictionary. >> >> -----Original Message----- >> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf >> > Of > >> Mark.W.Andrews >> Sent: Monday, October 06, 2008 3:12 PM >> To: [hidden email] >> Subject: Removing Value Labels >> >> Hi all, >> >> >> >> This is probably an easy question. Is there any way to remove >> > individual > >> value labels from a variable while keeping other value labels intact? >> >> >> >> Thanks in advance, >> >> >> >> Mark >> >> >> >> >> >> >> >> ======= >> 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 >> >> >> >> > > > ===================== 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
Art Kendall
Social Research Consultants |
|
In reply to this post by Mark.W.Andrews-2
In both 15 and 17, the suggested syntax seems at first to clear the specific value label.
Try, using, say, cars.sav, display dictionary variable=origin. <-- shows three labels add value labels origin 2 "". display dictionary variable=origin <- shows two labels in 15. In 17, shows the value 2 with label <none> In both versions, in the Data Editor, toggling labels on, the value 2 shows rather than any label. However, if you go to the Value Labels dialog box for this variable, you see 2 = "". Where this matters, particularly, is in Custom Tables, where the presence of the 2 in the variable dictionary for the variable causes 2 to show up in the canvas and in CTABLES output. There is a subtle distinction between no label and a null label. With a null label, the value is known to exist and can be included in Ctables output whether or not the current dataset actually has any such values (a long requested feature). So, to completely eradicate the value label, you have to recreate the label set by wiping out the labels and recreating them. APPLY DICTIONARY in replace mode is one way; programmability is another. Using the ValueLabels property of an spssaux.VariableDict object can do this conveniently. I can provide details on that if needed. HTH, Jon Peck -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mark.W.Andrews Sent: Monday, October 06, 2008 3:24 PM To: [hidden email] Subject: Re: [SPSSX-L] Removing Value Labels Richard, Thanks, I was trying this before but both methods don't seem to remove the actual value label (at least from the variable view). The label stays visible but is defined by the null strings. Maybe I am using another version (v15). Mark -----Original Message----- From: Oliver, Richard [mailto:[hidden email]] Sent: Monday, October 06, 2008 5:18 PM To: Oliver, Richard; Mark.W.Andrews; [hidden email] Subject: RE: Removing Value Labels If you need to remove more than one value label for the same variable, use null strings for the labels: data list free /x. begin data 1 2 3 4 end data. value labels x 1 'one' 2 'two' 3 'three' 4 'four'. display dictionary. add value lables x 3 "" 4 "". display dictionary. -----Original Message----- From: Oliver, Richard Sent: Monday, October 06, 2008 4:14 PM To: 'Mark.W.Andrews'; [hidden email] Subject: RE: Removing Value Labels Try the Add Value Labels Command, which can also remove labels if you specify values without corresponding labels, as in: data list free /x. begin data 1 2 3 4 end data. value labels x 1 'one' 2 'two' 3 'three' 4 'four'. display dictionary. add value lables x 4. display dictionary. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mark.W.Andrews Sent: Monday, October 06, 2008 3:12 PM To: [hidden email] Subject: Removing Value Labels Hi all, This is probably an easy question. Is there any way to remove individual value labels from a variable while keeping other value labels intact? Thanks in advance, Mark ======= 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 ===================== 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 |
