-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Milestone
Description
The bind_rows function seems to have difficulties handeling as.POSIXct(NA). It also returns the rather unhelpful message
POSIXct, POSIXt incompatible with data of type: POSIXct, POSIXt
Below are some simple examples.
# bind_rows does not work
bind_rows(data.frame(date = as.POSIXct(NA)),
data.frame(date = as.POSIXct("2015-05-05")))
## Error during wrapup: incompatible type (data index: 2, column: 'date', was collecting: POSIXct,
## POSIXt (dplyr::POSIXctCollecter<14>), incompatible with data of type: POSIXct, POSIXt
# same with rbind works
rbind(data.frame(date = as.POSIXct(NA)),
data.frame(date = as.POSIXct("2015-05-05")))
# funny that this works with logical NA
bind_rows(data.frame(date = NA),
data.frame(date = as.POSIXct("2015-05-05")))
# also it works the other way around
bind_rows(data.frame(date = as.POSIXct("2015-05-05")),
data.frame(date = as.POSIXct(NA)))
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels