Skip to content
Prev 4614 / 15274 Next

Index time change when coercing zoo object to xts

As another responder mentioned we really need it in a reproducible
form; however, we can guess that the source of the problem is that
zoo represents all times in their original class, presumably chron
in this case, without any modification whereas xts represents all
times in POSIXct no matter what their original form was so as.xts
must map them all to POSIXct and in this conversion can introduce
small differences.

I can't reproduce this (see code below) but if you provide x1 in a
reproducible form then the above hypothesis can be double checked.
+ 07/23/09 15:14:00,19805,291
+ 07/23/09 15:15:00,19816,298
+ 07/23/09 15:16:00,19820,357
+ 07/23/09 15:17:00,19813,218
+ 07/23/09 15:18:00,19789,203"
+ format = "%m/%d/%y %H:%M:%S")
V2  V3
(07/23/09 15:13:00) 19815 238
(07/23/09 15:14:00) 19805 291
(07/23/09 15:15:00) 19816 298
(07/23/09 15:16:00) 19820 357
(07/23/09 15:17:00) 19813 218
(07/23/09 15:18:00) 19789 203
V2  V3
(07/23/09 15:13:00) 19815 238
(07/23/09 15:14:00) 19805 291
(07/23/09 15:15:00) 19816 298
(07/23/09 15:16:00) 19820 357
(07/23/09 15:17:00) 19813 218
(07/23/09 15:18:00) 19789 203
On Thu, Jul 23, 2009 at 3:37 AM, Tseng Ko<ko.tseng at gmail.com> wrote: