Reputation: 1644
I tried this command
df<-read.csv("filename.csv",stringsAsFactors=FALSE)
For both, num
and int
variables, missing values are read as NA
. However, for chr
, missing values are read as ""
instead. When I take the command is.na("")
, it returns a FALSE. How do I rectify this?
I tried:
str(replace,"",NA")
, but it would not work.
Upvotes: 1
Views: 84