# Generating a numeric variable (e.g., read from the outputs of an hydrological model)
x <- 1:31
# Generating the dates corresponding to the previous outputs
dates <- dip("1961-01-01", "1961-01-31")
## Transforming from 'numeric' to 'zoo' class
x <- vector2zoo(x, dates)
Run the code above in your browser using DataLab