Last chance! 50% off unlimited learning
Sale ends in
vector2zoo(x, dates, date.fmt = "%Y-%m-%d")
x
. Valid object class for dates
are: character, factor, Date
format
in as.Date
.
ONLY required when class(dates)=="factor"
ox
.izoo2rzoo
, dip
, mip
, yip
# 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