[1] "2003-02-01" "2003-02-03" "2003-02-07" "2003-02-09" "2003-02-14"
time(x)[1] "2003-02-01" "2003-02-03" "2003-02-07" "2003-02-09" "2003-02-14"
## change class of index from Date to POSIXct
## relative to current time zone
x2003-02-01 2003-02-03 2003-02-07 2003-02-09 2003-02-14
-0.6264538 0.1836433 -0.8356286 1.5952808 0.3295078
index(x) <- as.POSIXct(format(time(x)),tz="")
x2003-02-01 2003-02-03 2003-02-07 2003-02-09 2003-02-14
-0.6264538 0.1836433 -0.8356286 1.5952808 0.3295078
## replace index/time of a zoo object
index(x) <- 1:5
x 1 2 3 4 5
-0.6264538 0.1836433 -0.8356286 1.5952808 0.3295078
time(x) <- 6:10
x 6 7 8 9 10
-0.6264538 0.1836433 -0.8356286 1.5952808 0.3295078
## query start and end of a zoo object
start(x)[1] 6
end(x)[1] 10
[1] 1 2 3 4 5