I am new to R programming. I have been using the data.table package, specifically fread, to import a file from a website. The file is type csv. The file has a lot of junk in it. What is causing an issue for me are the fields with " ". I've tried a variety of ways to coax the " " to NA, but haven't had luck. I did find this relevant posting:
Blank space not recognised as NA in fread
I modified fread
to say:
data6<-fread("https://data.colorado.gov/resource/8jg4-bud5.csv", na.strings = c("", "NA"))
and did see a lot of improvement with "".
Please help me address the issue in the file with " " or provide a workaround to change this to NA. I've tried a host of ways with no luck.
(I process the NA's later in the data cleansing phase).
You can download the file and modify it with - data6<-fread("https://data.colorado.gov/resource/8jg4-bud5.csv", na.strings = c("", "NA"))
.