I have a .csv file containing 4 columns of data against a column of dates/times at one-minute intervals. Some timestamps are missing, so I\'m trying to generate the missing
And to handle duplicated indices (see ?zoo and ?aggregate.zoo)
## zoo series with duplicated indexes
z3 <- zoo(1:8, c(1, 2, 2, 2, 3, 4, 5, 5))
plot(z3)
## remove duplicated indexes by averaging
lines(aggregate(z3, index, mean), col = 2, type = "o")
## or by using the last observation
lines(aggregate(z3, index, tail, 1), col = 4)