Good evening!
I have a large dataset which I am cleaning- variables currently have a mix of missing data coded as ".", "Missing" or "-9". I am trying to get all missing data coded as "."
All my variables are in byte format
When I run;
replace var1=. if var1==-9 it is successful
But attempting;
replace var2=. if var2=="Missing" brings up the error message "type mismatch" (or "Missing not found" if I remove the quotation marks)
I've tried many variations including: | replace var2=. if var2==Missing | replace var2="." if var2=="Missing" | var2=. if var2="Missing" etc..., but cannot find a solution to this
If anyone could point me in the right direction that would be great
I have a large dataset which I am cleaning- variables currently have a mix of missing data coded as ".", "Missing" or "-9". I am trying to get all missing data coded as "."
All my variables are in byte format
When I run;
replace var1=. if var1==-9 it is successful
But attempting;
replace var2=. if var2=="Missing" brings up the error message "type mismatch" (or "Missing not found" if I remove the quotation marks)
I've tried many variations including: | replace var2=. if var2==Missing | replace var2="." if var2=="Missing" | var2=. if var2="Missing" etc..., but cannot find a solution to this
If anyone could point me in the right direction that would be great

Comment