尝试根据包含DST(夏令时)的POSIXlt向量定义动物园对象时出现问题。 看一下zoo()函数的源代码,你可以看到警告来自match()的行为,而不考虑POSIXlt的时区。
任何解决方案?
library(zoo)
order.by <- seq(ISOdatetime(2004,10,31,0,0,0,tz = "Europe/Paris"),
ISOdatetime(2004,10,31,6,0,0,tz = "Europe/Paris"),
by=3600)
zoo(1:8, order.by) # no warning
zoo(1:8, as.POSIXlt(order.by)) # warning
Warning message:
In zoo(1:8, as.POSIXlt(order.by)) :
some methods for “zoo” objects do not work if the index entries in ‘order.by’ are not unique
谢谢,
的Jérémy