Hi - new to Stata.
I've run a script in Stata but now want to move my dataset into R. R is treating all Stata missing values as 0, so I want to recode them all in Stata as "NA". I've tried:
recode * (""=="NA")
But am getting the error code type mismatch. Is there a command to replace all missing variables, or to change the type of all missing variables? Or is there a better way to change variables before moving a dataset to R?
Thanks,
Sarah
I've run a script in Stata but now want to move my dataset into R. R is treating all Stata missing values as 0, so I want to recode them all in Stata as "NA". I've tried:
recode * (""=="NA")
But am getting the error code type mismatch. Is there a command to replace all missing variables, or to change the type of all missing variables? Or is there a better way to change variables before moving a dataset to R?
Thanks,
Sarah
Comment