Error in xts. This function uses seq.POSIXct , and the same behavior can be caused by:
seq(as.POSIXct("1986-10-01"), as.POSIXct("1986-11-01"), by="day")
And even more surprising for me is seq.POSIXlt
seq(as.POSIXlt("1986-10-01"), as.POSIXlt("1986-11-01"), by="day")
But this behavior is well documented in seq.POSIXt, and there is a condition for using by="DSTday" , which xts authors should probably have used for situations where days are an implicit interval. Temporary solution:
timeBasedSeq("19860601/19861231")[ !duplicated(timeBasedSeq("19860601/19861231") ]
or more compact:
unique(timeBasedSeq("19860601/19861231"))
source share