## simple creation and plotting
x.date <- as.POSIXct(paste("2003-02-", c(1, 3, 7, 9, 14), sep = ""))
x <- zoo(rnorm(5), x.date)
plot(x)
time(x)
## subsetting
x[1:3]
# create a constant series
z <- zoo(1, seq(4)[-2])
# create a series with zero columns
z0 <- zoo(, 1:4)[,-1]
Run the code above in your browser using DataLab