I am trying to set the C locale so that when I convert character objects to dates I don't get NA values. I got this solution from this question, but it's not working for me. When I run the first commented line,
> lct <- Sys.getlocale("LC_TIME"); Sys.setlocale("LC_TIME", "C")
I get the following warning:
Warning message:
In readLines(outfile) :
incomplete final line found on 'tmp/Rtmp8AJy9P/Rhttpd9742ffa74dc'
[1] "C"
Then when I try to convert a character object to date, I still get an NA of class date.
> x <- "2015-02-15"
> z <- as.Date(x, "%Y-%B-%d")
> Sys.Setlocale("LC_TIME", lct)
[1] "en_US.UTF-8"
> z
[1] NA
Does anyone know what that warning means and if it could be affecting the conversion that I run later?