x <- yearqtr(2000 + seq(0, 7)/4)
x
# returned Date is the fraction of the way through
# the period given by frac (= 0 by default)
as.Date(x)
as.Date(x, frac = 1)
as.POSIXct(x)
z <- zoo(rnorm(8), x, frequency = 4)
z
as.ts(z)
Run the code above in your browser using DataLab