I haven't changed anything except running the command after the paste and now it works.
------------------------------
Renee Damstra
------------------------------
Original Message:
Sent: Mon March 13, 2023 07:16 AM
From: Frank Watzl
Subject: Recoding variable question
Yes, paste only pastes. To run the syntax you need to select it in the syntax editor and then run it.
The RECODE statement in the print-screened syntax editor is incomplete. Even before running it you can recognize this by the red color of the word RECODE. Try to insert the syntax from your first posting instead of the incomplete statement and run it.
Original Message:
Sent: 3/13/2023 7:01:00 AM
From: Renee Damstra
Subject: RE: Recoding variable question
Could it be that selecting 'paste' instead of 'continue/ok' only pastes the syntax but does not run the command? Since I could not find the recoded variable anywhere.
I have now tried to run it in syntax and I get the error in the printscreen
------------------------------
Renee Damstra
Original Message:
Sent: Mon March 13, 2023 06:30 AM
From: Frank Watzl
Subject: Recoding variable question
Your syntax is correct. It creates and labels a new variable soc_alone_recoded. You should find the new variable at the end of the variable list. So at the very bottom in variable view or at the very right in data view.
Original Message:
Sent: 3/13/2023 6:24:00 AM
From: Renee Damstra
Subject: Recoding variable question
I have recoded a variable with the menu structure, syntax as follows:
RECODE soc_alone
DATASET ACTIVATE DataSet1.
RECODE soc_alone (1=7) (2=6) (3=5) (4=4) (5=3) (6=2) (7=1) INTO soc_alone_recoded.
VARIABLE LABELS soc_alone_recoded 'Ik vind het onaangenaam om alleen te zijn'.
EXECUTE.
However, is it correct that I cannot find a new variable soc_alone_recoded anywhere and it has overwritten the original variable soc_alone? Is a new variable always added at the end of the workspace? I can't find it and if I try Edit - Go to variable it is not listed.
------------------------------
Renee Damstra
------------------------------