I have data frame where the missing values are denoted with star sign "*".
I have replaced them with > mydata[mydata == "*"] <- NA
but when I use str(mydata)
it shows that the missing values are still "*". Like
'data.frame': 117 obs. of 8 variables:
$ PRICE: Factor w/ 82 levels "*","1000","1020",..: 36 37 39 39 35 34 32 29 27 26 ...
As if I have not applied > mydata[mydata == "*"] <- NA