Reputation:
I'm trying to manipulate some SPSS data and the code I'm using is specific to masking all values in a variable and replacing it with "MASKED" but I'd like to keep 2 specified values unmasked while masking the rest with the word "MASKED". The variable I am working with is v1 and the values I want to retain are "N/A" and "Did not answer".
The code I'm using:
ALTER TYPE v1 (A15).
RECODE v1 ("" = "") (else = "MASKED").
Upvotes: 1
Views: 97
Reputation: 11310
You should alter your code like this:
RECODE v1 ("" "N/A" "Did not answer" = copy) (else = "MASKED").
Upvotes: 1