我无法使用 lubridate 的pretty_dates
功能。在某些情况下它会失败:
library(lubridate)
datetimes <- structure(c(1391640346, 1393856900), class = c("POSIXct", "POSIXt"), tzone = "GMT")
pretty_dates(datetimes, 10)
(我通常不会像这样构建日期时间,这正是dput
给了我的。)这失败并显示错误消息:
Error in seq.POSIXt(start, end, paste(binlength, binunits)) : 'to' must be of length 1
我在这里做错了吗?
我正在使用lubridate_1.3.3
CRAN 的最新版本。