Is it possible to copy the value labels of a variable to another
variable through the syntax?
So for example
variable Emotions with value labels 1 "Happy" 2 "Sad" 3 "Joy".
how do I copy these value labels to the variable Universalemotions
through the syntax.
I know it's possible through copy pasting but I'm wondering if there
is a syntax way to do it, should be available and simple but can't
find it in the help files...
thank you very much,
Kind regards,
Filip Van Droogenbroeck
Does item 6 here do what you want?
www.spsstools.net/SampleSyntax.htm#LabelsAndVariableNames
--
Bruce Weaver
bwe...@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/Home
"When all else fails, RTFM."
You can do this with APPLY DICTIONARY (aka Data>Copy Data Properties)
Regards,
Jon Peck
Thanks Jon. Here is an example from the Help file:
APPLY DICTIONARY from *
/SOURCE VARIABLES = var1
/TARGET VARIABLES = var2 var3 var4
/NEWVARS.
• Variable definition attributes for var1 in the active dataset are
copied to var2, var3, and var4 in the same dataset if they have a
matching type.
• Any variables specified in the TARGET subcommand that do not already
exist are created, using the variable definition attributes of the
variable specified in the SOURCE subcommand.
Am I correct in thinking that APPLY DICTIONARY did not always have
this capability? Presumably, Raynald would not have written his macro
if he could have done this.
--
Bruce Weaver
bwe...@lakeheadu.ca
The original APPLY DICTIONARY command was much more rigid, but it was
reworked sometime around version 14.
Note that the command allows you to just copy value labels by
specifying /VARINFO VALLABELS=MERGE or REPLACE.
-Jon