Length one character vector always guessed as character #333
I have trouble attaching files, so I just put the content of the files here since they are simple.
I found a surprising behavior using read_csv function in readr package. The format of date is different when the input file has only one row vs. multiple rows.
Could you please take a look and see if this is a bug or user error?
Thanks a lot!
The text was updated successfully, but these errors were encountered:
I tried to figure out if this is related to a problem I'm having. It is not.
But since I have it, here's the example above, stripped way down:
library("readr") (a <- read_csv("2015-12-09\n", col_names = FALSE)) #> Source: local data frame [1 x 1] #> #> X1 #> (chr) #> 1 2015-12-09 (b <- read_csv("2015-12-09\n2015-12-10", col_names = FALSE)) #> Source: local data frame [2 x 1] #> #> X1 #> (date) #> 1 2015-12-09 #> 2 2015-12-10 class(a$X1) #>  "character" class(b$X1) #>  "Date"