使用POSIXlt和DST定义ZOO时间系列

时间:2015-04-10 15:16:07

标签: r match zoo posixlt

尝试根据包含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

0 个答案:

没有答案